This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc gets in the way of writing C that is also C++ wrt const
- From: Ian Lance Taylor <iant at google dot com>
- To: Jay K <jay dot krell at cornell dot edu>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 21 Jul 2009 09:33:52 -0700
- Subject: Re: gcc gets in the way of writing C that is also C++ wrt const
- References: <COL101-W181AA5B1132B355C9BCF06E61A0@phx.gbl>
Jay K <jay.krell@cornell.edu> writes:
> C:\>gcc -c 1.c
> 1.c:1: warning: `b' initialized and declared `extern'
>
>
> Why the warning?
Because it's usually not what you want when writing C.
The warning is disabled if you use the -Wc++-compat option.
Ian