asm qualifiers (PR55681)
PR55681 observes that currently only one qualifier is allowed for
inline asm, so that e.g. "volatile asm" is allowed, "const asm" is also
okay (with a warning), but "const volatile asm" gives an error. Also
"goto" has to be last.
This patch changes things so that only "asm-qualifiers" are allowed,
that is "volatile" and "goto", in any combination, in any order, but
without repetitions.
PR inline-asm/55681
* doc/extend.texi (Basic Asm): Update grammar.
(Extended Asm): Update grammar.
gcc/c/
PR inline-asm/55681
* c-parser.c (c_parser_asm_statement): Update grammar. Allow any
combination of volatile and goto, in any order, without repetitions.
gcc/cp/
PR inline-asm/55681
* parser.c (cp_parser_asm_definition): Update grammar. Allow any
combination of volatile and goto, in any order, without repetitions.
gcc/testsuite/
PR inline-asm/55681
* gcc.dg/asm-qual-1.c: Test that "const" and "restrict" are refused.
* gcc.dg/asm-qual-2.c: New test, test that asm-qualifiers are allowed
in any order, but that duplicates are not allowed.
From-SVN: r266859