[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extend AT_CHECK_MACRO to test macros with -O2 -Wall -Werror

From: Ralf Wildenhues
Subject: Re: Extend AT_CHECK_MACRO to test macros with -O2 -Wall -Werror
Date: Sun, 18 May 2008 18:05:59 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

* Didier Barvaux wrote on Sat, May 10, 2008 at 05:37:57PM CEST:
> I encountered a problem with the AC_C_CONST macro when using -O2 -Wall
> -Werror as CFLAGS. The AC_C_CONST macro broke with similar CFLAGS some
> time ago [1]. Thus I created a patch that extends the AT_CHECK_MACRO
> macro used in the testsuite.

> +# We run `configure' one more time with CFLAGS to check that unused or
> +# uninitialized variables do not change the macro result.

I understand the motivation behind this patch.  But it should be done
carefully, if at all possible.  Different GCC versions emit different
sets of warnings.  Also, some other compilers may understand -O2 -Wall
-Werror (Intel, PathScale?, Portland?) and many more do not.

In general, it is really impossible to write Autoconf tests in a way
such that no compiler emits warnings at all.  Thus enabling -Werror
unconditionally is somewhat of a bad idea.

There is still the pending patch submission to have more flexible
AC_LANG_WERROR.  Unfortunately, my time to work on Autoconf is currently
quite limited...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]