Hi,
This code compiles fine with gcc:
void a$() {}
int main() { a$(); }
This generates invalid assembly code:
void $() {}
int main() { $(); }
To gas, an initial $ is not allowed in an identifier, but to gcc, it is, so gcc
can't simply copy the function name to the assembly output, unless $ also
becomes an invalid identifier in C.
The code can, of course, compile successfully with -fleading-underscore.
--
Summary: Invalid assembly code on initial dollar signs
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: truedfx at gentoo dot org
GCC host triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31782