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 target/31782] Invalid assembly code on initial dollar signs


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.


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