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]
Other format: [Raw text]

Fwd: label conflict resolution for global variables


When using g++, one can get label conflicts in assembler code by using
specific names for globals that match up against functions. e.g.:

void a () {}
int _Z1av;

since the 'a' function is mapped to the label "_Z1av". (compile with
-S and look at the .s file.) This occurs even when the global variable
isn't declared within an extern "C" {} block. Should non-'extern "C"
{}' global variable names also be decorated?


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