This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-std=c89 shouldn't allow post-statement declarations
- From: Jamie Zawinski <jwz at jwz dot org>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 22 Jul 2003 15:30:18 -0700
- Subject: -std=c89 shouldn't allow post-statement declarations
- Organization: my own bad self
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/