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

Re: External or local SYMBOL_REF?


> If I have an rtx x for which GET_CODE (x) == SYMBOL_REF, how do I
> find out whether the symbol is external or local?
> 
> E.g.
> 
> extern int a; // external
> static int b; // local
>        int c; // local

There no such information in the rtl in general.
You can arrange for the inforamation to be extracted from the tree and
encoded in the name of the symbol by defining ENCODE_SECTION_INFO.

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