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

[Bug c/31782] New: Invalid assembly code on initial dollar signs


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


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