This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-in-cxx update
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 29 Apr 2009 11:21:58 +0000 (UTC)
- Subject: Re: gcc-in-cxx update
- References: <m3hc0729jr.fsf@google.com>
On Wed, 29 Apr 2009, Ian Lance Taylor wrote:
> * The C++ frontend warns about "while (true);" when there is no
> whitespace between the ')' and the ';'. The C frontend does not. I'm
> not sure how to best handle this. It doesn't make much sense to warn
> about this with -Wc++-compat. Should the C frontend warn about this?
> Should the C++ frontend not warn about this? Any opinions?
I consider this whitespace-sensitive warning very dubious.
> * In C a const variable which is neither "extern" nor "static" is
> visible outside of the current translation unit. In C++ it is not,
> without an explicit "extern" declaration. I'm not sure how best to
> handle this with -Wc++-compat, since C does not permit initializing an
> "extern const" variable.
C does permit it; there's a warning, not a pedwarn. Add an option to
disable this warning (at least where "const" is used)?
--
Joseph S. Myers
joseph@codesourcery.com