]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/ChangeLog
c/c++, asm: Use nicer error for const and restrict
authorSegher Boessenkool <segher@kernel.crashing.org>
Wed, 19 Dec 2018 16:16:05 +0000 (17:16 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Wed, 19 Dec 2018 16:16:05 +0000 (17:16 +0100)
commit1edf88662b51da93460b6139344edb5f9b943b0e
tree4074dd0bc5bdd8115294b76ba0ef8f2f85e76a2a
parentdb4fd626ee2bb431adadddf5eca5fba104cea5ca
c/c++, asm: Use nicer error for const and restrict

Not all qualifiers are asm qualifiers.  We can talk about that in a
nicer way than just giving a generic parser error.

This also adds two testcases for C++, that previously were for C only.

c/
* c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
a more specific error message (instead of just falling through).

cp/
* parser.c (cp_parser_asm_definition) <RID_CONST, RID_RESTRICT>: Give
a more specific error message (instead of just falling through).

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

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