c++, asm: Do not handle any asm-qualifiers in top-level asm
authorSegher Boessenkool <segher@kernel.crashing.org>
Wed, 19 Dec 2018 16:22:47 +0000 (17:22 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Wed, 19 Dec 2018 16:22:47 +0000 (17:22 +0100)
commit7c67ff4a1b44996cea0a72d0d9ee585c59fe2934
tree579c243ba3642e4eb997b3da7d02917862080b77
parent1edf88662b51da93460b6139344edb5f9b943b0e
c++, asm: Do not handle any asm-qualifiers in top-level asm

Previously, "volatile" was allowed.  Changing this simplifies the code,
makes things more regular, and makes the C and C++ frontends handle
this the same way.

cp/
* parser.c (cp_parser_asm_definition): Do not allow any asm qualifiers
on top-level asm.

testsuite/
* g++.dg/asm-qual-3.C: New testcase.
* gcc.dg/asm-qual-3.c: New testcase.

From-SVN: r267280
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/asm-qual-3.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/asm-qual-3.c [new file with mode: 0644]