This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Fwd: label conflict resolution for global variables
- From: "Andrew Ducore" <aducore at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 26 Nov 2007 16:36:29 -0500
- Subject: Fwd: label conflict resolution for global variables
- References: <66c0fc020711261302q1aebeec1yebb6b702b0579056@mail.gmail.com>
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?