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

            Bug ID: 89585
           Summary: GCC 8.3: asm volatile no longer accepted at file scope
           Product: gcc
           Version: 8.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: harald at gigawatt dot nl
  Target Milestone: ---

From GCC 3.4 to 8.2, GCC would accept

  asm volatile("");

at file scope in C++ mode, though not in C mode. This no longer works in GCC
8.3, in either mode. It now results in

test.cc:1:5: error: expected ‘(’ before ‘volatile’
 asm volatile("");
     ^~~~~~~~
     (
test.cc:1:14: error: expected unqualified-id before string constant
 asm volatile("");
              ^~
test.cc:1:14: error: expected ‘)’ before string constant
 asm volatile("");
             ~^~
              )

This may have been useless (as covered by -Wasm-ignored-qualifier), but making
it a hard error breaks the compilation of existing projects after upgrading
from GCC 8.2 to 8.3.

Reply via email to