https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89443

            Bug ID: 89443
           Summary: asm "volatile" keyword no longer supported
           Product: gcc
           Version: 8.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 45791
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45791&action=edit
compressed preprocessed source

I'm not certain whether this is a gcc bug at all:
The attached preprocessed source, taken from qtscript-5.11.3, throws this error
with current gcc-8.2.1. A gcc-8 snapshot taken on 01-DEC-2018 used to compile
this package just fine.

It seems that the "volatile" in asm volatile (...) is no longer valid:

g++ -c test.i         
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:483:5: error:
expected ‘(’ before ‘volatile’
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:484:1: error:
expected unqualified-id before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:483:15: error:
expected ‘)’ before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:518:5: error:
expected ‘(’ before ‘volatile’
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:519:1: error:
expected unqualified-id before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:518:15: error:
expected ‘)’ before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:534:5: error:
expected ‘(’ before ‘volatile’
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:535:1: error:
expected unqualified-id before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:534:15: error:
expected ‘)’ before string constant


E.g line 105753 in test.i file:

asm volatile (
".text\n"
".globl " "ctiTrampoline" "\n"
".hidden " "ctiTrampoline" "\n"
"ctiTrampoline" ":" "\n"
    "pushq %rbp" "\n"
    "movq %rsp, %rbp" "\n"
    "pushq %r12" "\n"
[...]

removing the "volatile" solves this.  gcc-7.4.1 has the same problems.

Thank you!

Reply via email to