public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/31782]  New: Invalid assembly code on initial dollar signs
@ 2007-05-02  2:20 truedfx at gentoo dot org
  2007-05-02  2:22 ` [Bug c/31782] " truedfx at gentoo dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: truedfx at gentoo dot org @ 2007-05-02  2:20 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <bug-31782-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2024-04-02 21:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-02  2:20 [Bug c/31782] New: Invalid assembly code on initial dollar signs truedfx at gentoo dot org
2007-05-02  2:22 ` [Bug c/31782] " truedfx at gentoo dot org
2007-05-02  2:33 ` [Bug target/31782] " pinskia at gcc dot gnu dot org
2007-05-02  4:58 ` truedfx at gentoo dot org
2007-05-02 11:58 ` joseph at codesourcery dot com
     [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
2011-02-04 16:42 ` funto66 at gmail dot com
2014-06-22  8:42 ` raphael.jakse at gmail dot com
2014-06-22 11:27 ` harald at gigawatt dot nl
2014-06-23  7:25 ` raphael.jakse at gmail dot com
2014-06-23 21:36 ` harald at gigawatt dot nl
2014-06-24  7:37 ` raphael.jakse at gmail dot com
2021-07-29 23:45 ` pinskia at gcc dot gnu.org
2021-07-29 23:46 ` pinskia at gcc dot gnu.org
2021-07-29 23:46 ` pinskia at gcc dot gnu.org
2021-08-03  1:18 ` pinskia at gcc dot gnu.org
2024-04-02 21:01 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).