[Top][All Lists]

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

Re: coreutils-6.5: yet another C89 problem

From: Matthew Woehlke
Subject: Re: coreutils-6.5: yet another C89 problem
Date: Tue, 28 Nov 2006 09:56:22 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061025 Thunderbird/ Mnenhy/

Bob Proulx wrote:
Paul Eggert wrote:
Matthew Woehlke <address@hidden> writes:

I could probably do it on
this box, but since it's Linux, it would still be with gcc.
Even that would be helpful, since our current buildbot doesn't do the
particular combination of GCC options you're interested in.

I would be happy to add a special-options-build to the buildbot to
check for c89 compatibility.  I will patch in the c99-to-c89.diff
first of course.  What options would be required for this?  Is
"-Wdeclaration-after-statement -Werror" sufficient?

Strictly speaking, no it isn't(*), but it catches by far the most common non-c89-compliant error. AFAIAC it is "good enough" to enforce check-in policy and get decl-after-stmt-isms fixed right away. Any more exotic non-compliances can wait for people to do real builds.

(* You would need to (a) somehow force gcc to reject all non-c89 constructs or (b) use a pure c89 compiler that does not support anything extensions. However, I (a) couldn't figure out how to do this, and (b) know of no such compiler for Linux. The only reasonable solution for (b) would be to use several different c89 compilers on more exotic platforms.)

Caution: keep out of reach of adults.

reply via email to

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