[Top][All Lists]

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

Re: AC_CHECK_SIZEOF failing on undefined HAVE_STDINT_H with -Werror

From: Ralf Wildenhues
Subject: Re: AC_CHECK_SIZEOF failing on undefined HAVE_STDINT_H with -Werror
Date: Wed, 16 Aug 2006 07:18:28 +0200
User-agent: Mutt/1.5.12-2006-07-14

* David Fang wrote on Wed, Aug 16, 2006 at 02:15:09AM CEST:
> > Thanks for reporting this; I didn't realize it was a regression.
> > -Wundef is a bit controversial, but it's easy for Autoconf to support
> > its use for programmers that prefer it, so I installed the following
> > patch.

> In practice, I have actually caught one or two serious errors using
> -Wundef -Werror, as anal-retentive and controversial as it may seem.

In practice, with the set of warning flags you posted previously, you
will break several Autoconf macros in very subtle ways (and no, not all
are easy to fix).

> Wasn't it pointed out in this thread (#if vs. #ifdef) that evaluating
> an undefined macro with #if is undefined in standard C?  (i.e. cannot
> assumed to be equivalent to evaluating 0).

It was claimed but then proved to be a false statement.  IOW: evaluating
an undefined macro with #if is perfectly acceptable C89.

> Also perhaps it should be noted somewhere that while autoconf's m4 macros
> now use #ifdef to conditionally include headers, users may still use
> #if USER_DEFINED_MACRO as long as the said macro is defined in all cases
> by the configure test.  This internal change doesn't force any users to
> define and use configure macros with one convention or the other.  The
> important thing is that definition and use are consistent.

Not with the direction the change is going now.  Au contraire: it is
safe for users to use #if throughout; their motivation to change would
stem from the desire to be able to build with '-Wundef -Werror', not any
change within Autoconf.

> Just confirming: will this revision appear in release 2.61?

Unless it is reverted in some way, yes.


reply via email to

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