[Top][All Lists]

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

Re: [Nmh-workers] problem compiling nmh 1.6 on linux gentoo

From: Tom Lane
Subject: Re: [Nmh-workers] problem compiling nmh 1.6 on linux gentoo
Date: Sun, 29 Nov 2015 15:06:44 -0500

Ken Hornstein <address@hidden> writes:
>> I would put the true blame on whatever decided to add -ansi -pedantic
>> (particularly the latter) to the compiler switches.  Those are useful
>> switches for software developers to use, if they are concerned about
>> hewing as closely as possible to ancient C standards ... but one should
>> never ever set things up to select them by default for builds in-the-wild.
>> That won't ever lead to anything but grief, as it did here, because you
>> can't expect that system tools or system header files are going to still
>> be trying to be C89-compliant, let alone satisfy -pedantic.

> (Personally, I still think it's rather unfriendly for tools like flex to
> generate code with new-style comments, but I'm probably in the minority
> on that one).

Personally I agree; but it's 2015 and it's not exactly unlikely that
people aren't checking their patches against strict-C89 compilers.
So on the principle of "be conservative in what you send and liberal
in what you accept", the best approach is to make your own code compile
under strict settings, but not to assume that everything you'll get
compiled with is equally clean.

This may mean that there need to be separate "maintainer" compile flags,
so that the strict settings aren't part of the default.  I haven't studied
the nmh build logic in awhile, so not sure how painful that might be.

> And you know ... the weirdest thing is, that particular comment in the
> flex skeletion does not appear in the revision history of flex anywhere.
> It's definitely in the distribution, but not in the tree on sourceforge.
> So I don't know who inserted it.

Odd.  It does not look like it'd be a vendor-specific patch ...

                        regards, tom lane

reply via email to

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