From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-04 19:18:17
|
Commit-ID: 52e8646d17b47c65b2c08010df22342efd07305b Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=52e8646d17b47c65b2c08010df22342efd07305b Author: H. Peter Anvin <hp...@zy...> AuthorDate: Tue, 1 Mar 2016 22:20:10 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Fri, 4 Mar 2016 11:14:35 -0800 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. >From master branch checkin 25da6eaf434705a6ad01f252132dc7f109493c67, except that -Wwrite-strings is omitted; making the code base -Wwrite-strings clean is going to take additional work. Signed-off-by: H. Peter Anvin <hp...@zy...> --- aclocal.m4 | 3 ++- configure.in | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aclocal.m4 b/aclocal.m4 index 8951278..50c1af8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -9,7 +9,8 @@ AC_DEFUN(PA_ADD_CFLAGS, CFLAGS="$CFLAGS $1" AC_TRY_LINK([#include <stdio.h>], [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]) CFLAGS="$pa_add_cflags__old_cflags")]) diff --git a/configure.in b/configure.in index b7f7110..cbaebc4 100644 --- a/configure.in +++ b/configure.in @@ -183,6 +183,10 @@ AC_ARG_ENABLE([ccache], []) 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]) AC_ARG_ENABLE([werror], [AC_HELP_STRING([--enable-werror], [compile with -Werror to error out on any warning])], |