Skip to content

Commit 888d9ab

Browse files
author
H. Peter Anvin
committed
configure.ac: enable some -Werror= warnings not included in -W -Wall -pedantic
For some reason, these warnings are not included in -W -Wall -pedantic, at least not on gcc 14.2.1: -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations This caused a missing prototype error (because nasm_note[f]() prototypes were missing from include/error.h) to get missed when compiling with --enable-werror, which is ironic at best. Signed-off-by: H. Peter Anvin <[email protected]>
1 parent 25757f8 commit 888d9ab

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

configure.ac

+7-3
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,17 @@ PA_ARG_ENABLED([werror],
306306
PA_ADD_CFLAGS([-Werror=return-type])
307307
PA_ADD_CFLAGS([-Werror=trigraphs])
308308
PA_ADD_CFLAGS([-Werror=pointer-arith])
309-
PA_ADD_CFLAGS([-Werror=strict-prototypes])
310-
PA_ADD_CFLAGS([-Werror=missing-prototypes])
311-
PA_ADD_CFLAGS([-Werror=missing-declarations])
312309
PA_ADD_CFLAGS([-Werror=comment])
313310
PA_ADD_CFLAGS([-Werror=vla])]
314311
)
315312

313+
dnl These warnings are apparently not included in -Wall -W -pedantic
314+
dnl for some bizarre reason. They are, however, absolutely forbidden
315+
dnl in this code base.
316+
PA_ADD_CFLAGS([-Werror=strict-prototypes])
317+
PA_ADD_CFLAGS([-Werror=missing-prototypes])
318+
PA_ADD_CFLAGS([-Werror=missing-declarations])
319+
316320
dnl Variadic macros are used in this code, but only under explicit guard
317321
PA_ADD_CFLAGS([-Wvariadic-macros],[-Wno-variadic-macros])
318322
dnl Suppress format warning on Windows targets due to their <inttypes.h>

0 commit comments

Comments
 (0)