c: Allow duplicate C2x standard attributes
authorJoseph Myers <joseph@codesourcery.com>
Tue, 27 Oct 2020 22:15:46 +0000 (22:15 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 27 Oct 2020 22:15:46 +0000 (22:15 +0000)
commit75ce04fba49eb30b6a8fe23bc3605cf0ef9a8e28
tree4dd84b104dc8e59b2dca26841152fe0abc57e07e
parent668894d7b584b40ddb46e9e2e2ffa637f4d732e5
c: Allow duplicate C2x standard attributes

N2557, accepted into C2x at the October WG14 meeting, removes the
requirement that duplicates of standard attributes cannot appear
within an attribute list (so allowing e.g. [[deprecated, deprecated]],
where previously that was disallowed but [[deprecated]] [[deprecated]]
was OK).  Remove the code checking for this (standard attributes
aren't in any released version of the C standard) and update tests
accordingly.

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

gcc/c/
2020-10-27  Joseph Myers  <joseph@codesourcery.com>

* c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
standard attributes.

gcc/testsuite/
2020-10-27  Joseph Myers  <joseph@codesourcery.com>

* gcc.dg/c2x-attr-deprecated-4.c, gcc.dg/c2x-attr-fallthrough-4.c,
gcc.dg/c2x-attr-maybe_unused-4.c: Allow duplicate attributes.
gcc/c/c-parser.c
gcc/testsuite/gcc.dg/c2x-attr-deprecated-4.c
gcc/testsuite/gcc.dg/c2x-attr-fallthrough-4.c
gcc/testsuite/gcc.dg/c2x-attr-maybe_unused-4.c