pspp-dev
[Top][All Lists]
Advanced

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

Re: enable -Wdeclaration-after-statement


From: Ben Pfaff
Subject: Re: enable -Wdeclaration-after-statement
Date: Thu, 30 Mar 2006 15:52:37 -0800
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Ben Pfaff <address@hidden> writes:

> I've noticed that recently some code has been checked in that
> puts declarations after statements within a single block.  C++
> accepts that, and so does C99, and so does GCC with its
> extensions enabled, but it's not allowed in C90.  If I recall
> correctly, we had to fix a few of these that crept in before the
> 0.4.0 release when we tested with other compilers.
>
> Thus, I've prepared a change set to enable a warning for this.
> Old GCC doesn't support the warning, so we have to check for
> support.

Seeing no objections, I've checked this in.

> Here's the set of changes.  I also have it check for -Wshadow,

I didn't enable -Wshadow, actually, because it complained more
than I expected.  Maybe later when I have time to look at its
complaints.
-- 
Ben Pfaff 
email: address@hidden
web: http://benpfaff.org




reply via email to

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