Loading...

gcc-help@gcc.gnu.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

Global Definition Vs Global Declaration zahed khurasani Wed Apr 04 10:01:54 2012

Hi,

How can I distinguish between the following two declarations (both
appear outside any function at file scope)?

extern int i;
int i;

Both show up as VAR_DECL nodes in the BLOCK_VARS of the
TRANSLATION_UNIT_DECL. Moreover, both return true for DECL_EXTERNAL. I
need a way to say which is which in my plugin code.

Thanks for the help.

Zahed