mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-15 09:09:58 +08:00
configure: enable additional code cleanliness warnings
We are supposed to handle compiling on a "C90 plus long long" compiler, so make gcc (our most common development platform compiler) complain when we don't. However, suppress the complaints about the Microsoft definitions of the <inttypes.h> strings. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
ef63588eb4
commit
25da6eaf43
3
aclocal.m4
vendored
3
aclocal.m4
vendored
@ -9,7 +9,8 @@ AC_DEFUN(PA_ADD_CFLAGS,
|
|||||||
CFLAGS="$CFLAGS $1"
|
CFLAGS="$CFLAGS $1"
|
||||||
AC_TRY_LINK([#include <stdio.h>],
|
AC_TRY_LINK([#include <stdio.h>],
|
||||||
[printf("Hello, World!\n");],
|
[printf("Hello, World!\n");],
|
||||||
AC_MSG_RESULT([yes]),
|
AC_MSG_RESULT([yes])
|
||||||
|
CFLAGS="$pa_add_cflags__old_cflags ifelse([$2],[],[$1],[$2])",
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
CFLAGS="$pa_add_cflags__old_cflags")])
|
CFLAGS="$pa_add_cflags__old_cflags")])
|
||||||
|
|
||||||
|
@ -189,6 +189,11 @@ PA_ADD_CFLAGS([-W])
|
|||||||
PA_ADD_CFLAGS([-Wall])
|
PA_ADD_CFLAGS([-Wall])
|
||||||
PA_ADD_CFLAGS([-std=c99])
|
PA_ADD_CFLAGS([-std=c99])
|
||||||
PA_ADD_CFLAGS([-pedantic])
|
PA_ADD_CFLAGS([-pedantic])
|
||||||
|
dnl Suppress format warning on Windows targets due to their <inttypes.h>
|
||||||
|
PA_ADD_CFLAGS([-Wpedantic-ms-format],[-Wno-pedantic-ms-format])
|
||||||
|
PA_ADD_CFLAGS([-Wc90-c99-compat])
|
||||||
|
PA_ADD_CFLAGS([-Wlong-long],[-Wno-long-long])
|
||||||
|
PA_ADD_CFLAGS([-Wwrite-strings])
|
||||||
AC_ARG_ENABLE([werror],
|
AC_ARG_ENABLE([werror],
|
||||||
[AC_HELP_STRING([--enable-werror],
|
[AC_HELP_STRING([--enable-werror],
|
||||||
[compile with -Werror to error out on any warning])],
|
[compile with -Werror to error out on any warning])],
|
||||||
|
Loading…
Reference in New Issue
Block a user