gcc gets in the way of writing C that is also C++ wrt const

Ian Lance Taylor iant@google.com
Tue Jul 21 16:34:00 GMT 2009


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



More information about the Gcc-help mailing list