diff --git a/compiler.h b/compiler.h index 310e79b9..baa8d197 100644 --- a/compiler.h +++ b/compiler.h @@ -72,12 +72,6 @@ #define __STDC_LIMIT_MACROS 1 #define __STDC_FORMAT_MACROS 1 -#ifdef __GNUC__ -# define _unused __attribute__((unused)) -#else -# define _unused -#endif - /* Some versions of MSVC have these only with underscores in front */ #include #include diff --git a/configure.in b/configure.in index b7057c92..317fbe29 100644 --- a/configure.in +++ b/configure.in @@ -197,6 +197,8 @@ dnl PA_ADD_CFLAGS([-Wwrite-strings]) AC_ARG_ENABLE([werror], [AC_HELP_STRING([--enable-werror], [compile with -Werror to error out on any warning])], +[], [enable_werror=no]) +AS_IF([test x"$enable_werror" != xno], [PA_ADD_CFLAGS([-Werror])], [PA_ADD_CFLAGS([-Werror=implicit]) PA_ADD_CFLAGS([-Werror=missing-braces]) diff --git a/doc/changes.src b/doc/changes.src index c6738b94..9f1c5631 100644 --- a/doc/changes.src +++ b/doc/changes.src @@ -7,6 +7,12 @@ The NASM 2 series supports x86-64, and is the production version of NASM since 2007. + +\S{cl-2.12.01} Version 2.12.01 + +\b Portability fixes for some platforms. + + \S{cl-2.12} Version 2.12 \b Major fixes to the \c{macho} backend (\k{machofmt}); earlier versions diff --git a/output/codeview.c b/output/codeview.c index 2df6b056..7fc5619e 100644 --- a/output/codeview.c +++ b/output/codeview.c @@ -417,7 +417,7 @@ static void register_reloc(struct coff_Section *const sect, return; } } - nasm_assert(!"relocation for unregistered symbol"); + nasm_panic(0, "codeview: relocation for unregistered symbol: %s", sym); } static inline void section_write32(struct coff_Section *sect, uint32_t val) diff --git a/output/outmacho.c b/output/outmacho.c index 8ad52c24..5fbc9a9c 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -300,9 +300,6 @@ static uint64_t rel_padcnt = 0; #define alignptr(x) \ ALIGN(x, fmt.ptrsize) /* align x to output format width */ -static void debug_reloc (struct reloc *); -static void debug_section_relocs (struct section *) _unused; - static struct section *get_section_by_name(const char *segname, const char *sectname) { @@ -1595,30 +1592,6 @@ static void macho_cleanup(int debuginfo) nasm_free(sectstab); } -/* Debugging routines. */ -static void debug_reloc (struct reloc *r) -{ - fprintf (stdout, "reloc:\n"); - fprintf (stdout, "\taddr: %"PRId32"\n", r->addr); - fprintf (stdout, "\tsnum: %d\n", r->snum); - fprintf (stdout, "\tpcrel: %d\n", r->pcrel); - fprintf (stdout, "\tlength: %d\n", r->length); - fprintf (stdout, "\text: %d\n", r->ext); - fprintf (stdout, "\ttype: %d\n", r->type); -} - -static void debug_section_relocs (struct section *s) -{ - struct reloc *r = s->relocs; - - fprintf (stdout, "relocs for section %s:\n\n", s->sectname); - - while (r != NULL) { - debug_reloc (r); - r = r->next; - } -} - #ifdef OF_MACHO32 static const struct macho_fmt macho32_fmt = { 4,