lkml.org 
[lkml]   [2002]   [Jan]   [3]   [last100]   RSS-feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Complete thread (EXPERIMENTAL)
/
DateWed, 02 Jan 2002 23:56:25 -0800
FromAndrew Morton <>
SubjectRe: Extern variables in *.c files
Digg This
"H . J . Lu" wrote:

...
Compile doesn't emit the size info for

extern char a;

You're right. I goofed.

One way to fix it is to remove

extern char a;

and put

extern int a;

in a header file which is included by everyone.


Yup. Problem is, we have about 1500 instances in the kernel :(
(Wouldn't it be nice if `int a;' generated a compiler error if a declaration `extern int a;' was not in scope?)
Oh well. Seems that disabling -fno-common and enabling --warn-common is the only way to autodetect bugs such as this.
\
ISP Services
Valid XHTML 1.0!\ /
Valid CSS! Last update: 2005-03-22 12:15    [W:0.749 / U:0.000 seconds]
©2003-2005 Jasper Spaans