This is the mail archive of the gcc-help@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]

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


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


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