[Top][All Lists]

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

Re: [Nmh-workers] Having configure Check for cc's -pedantic -ansi.

From: Tom Lane
Subject: Re: [Nmh-workers] Having configure Check for cc's -pedantic -ansi.
Date: Fri, 21 Oct 2016 10:38:10 -0400

David Levine <address@hidden> writes:
> Ralph wrote:
>> I've since overridden configure's CFLAGS to add `-pedantic
>> -ansi', but I wonder if m4/cppflags.m4 should attempt these
>> and add them if they work?

> We used to do this, but I removed them in commit 987b10b3.  My
> thinking was that CFLAGS is up to the user.  I still think that's
> the right thing to do.  We do add -Wall -Wextra with gcc but those
> don't cause compilation failure (and I've thought about removing
> them).

Note that '-ansi -pedantic' produces warnings about all constructs that
aren't in C89, which is a much harsher restriction than has any real-world
relevance today.  I could see a bit more justification for '-std=c99
-pedantic', but that is still kind of problematic.  If you've made a
configure test for some feature, found it works, and are using it, you
don't really want warnings about it.

                        regards, tom lane

reply via email to

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