This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-std=c89 shouldn't allow post-statement declarations


In gcc 2.96, using -std=c89 caused declarations following statements to
signal an error.

In gcc 3.2.2, declarations following statements are silently allowed.

I would like the previous behavior back, please.

It might be sensible for this to be allowed with -std=gnu89, but
-std=c89 should not allow syntax that was not a part of the C89 spec.

I realize that using -pedantic helps with this, but I find that that
causes too many warnings: e.g., I can't compile Gtk programs without a
slew of warnings from their header files.

I have found that with gcc2, "-std=c89 -U__STRICT_ANSI__" is the right
tradeoff, giving me a good level of cross-platform portability checking
without drowning me in warnings.  

But it seems that this change in gcc3 has taken away this middle ground,
reducing my options to "too few warnings" and "way too many."

-- 
Jamie Zawinski
jwz@jwz.org             http://www.jwz.org/
jwz@dnalounge.com       http://www.dnalounge.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]