This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/31782] Invalid assembly code on initial dollar signs
- From: "raphael.jakse at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 22 Jun 2014 08:42:33 +0000
- Subject: [Bug target/31782] Invalid assembly code on initial dollar signs
- Auto-submitted: auto-generated
- References: <bug-31782-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31782
RaphaÃl JAKSE <raphael.jakse at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |raphael.jakse at gmail dot com
--- Comment #6 from RaphaÃl JAKSE <raphael.jakse at gmail dot com> ---
New information on this bug:
With gcc version 4.8.3-3 on Debian x86-64 targeting x86_64-linux-gnu, trying to
get the assembly version of the following code with gcc -S:
void $() {}
void a() { $(); }
I get:
[...]
call $
[...]
With clang, I get:
[...]
callq ($)
[...]
Making the corresponding object file of this code with gcc -c
- succeed with the assembly code generated by clang
- fails with the assembly code generated by gcc with the following message:
t.c: Assembler messages:
t.c:30: Error: missing or invalid immediate expression `'
Adding parentheses in the assembly code generated by gcc:
call $ â call ($)
make the object file generation succeed.
Clang seems to add parentheses whenever the function name starts with a dollar
sign ($).