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: "harald at gigawatt dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 22 Jun 2014 11:26:53 +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
--- Comment #7 from Harald van Dijk <harald at gigawatt dot nl> ---
That's good to know. Trying some more, clang does manage to get even weirder
symbol names right, because gas does have a form of quoting already, and clang
makes use of it.
int x __asm__(")");
int main() { return x; }
With clang, this works.
...
movl ")", %eax
...
.type ")",@object # @")"
.comm ")",4,4
...
If it's simpler to implement, then instead of parenthesising, $ could
alternatively be treated as a symbol that needs quoting, which is a more
general solution that will work for any possible symbol name.