[lkml]   [2000]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.2.18 signal.h
On Fri, Dec 15, 2000 at 04:06:36PM -0300, Horst von Brand wrote:
> "Richard B. Johnson" <> said:
> [...]
> > Both examples allow an extern declaration inside a function scope
> > which is also contrary to any (even old) 'C' standards. 'extern'
> > is always file scope, there's no way to make it otherwise.
> AFAIR (rather dimly... no K&R at hand here) if you have an extern
> declaration inside a block, it will be visible only within that block. The
> object itself certainly is file scope (or larger).

Old K&R allowed the following:

extern int a;

a = 1;

a = 2;

Ie, compiler put the definition for a in the file scope symbol table, and not
the current block's. The above example is illegal in ISO C.

Michael Meissner, Red Hat, Inc. (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: phone: +1 978-486-9304
Non-work: fax: +1 978-692-4482
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.046 / U:29.868 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site