Add more C2x attributes tests.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 18 Nov 2019 17:41:40 +0000 (17:41 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Mon, 18 Nov 2019 17:41:40 +0000 (17:41 +0000)
commit092508a07975a00b3bc7c4c6ef551d5b6dc2c193
treec89eb335e50073d6894de650c5344e92b4195c93
parent9d2b80ea51e42d5011badf2d654fb3fd93289fe3
Add more C2x attributes tests.

This patch adds more tests of C2x attributes, where I found cases that
were handled correctly by my patches but missing from the original
tests.  Tests are added for -std=c11 -pedantic handling of C2x
attribute syntax and corresponding -Wc11-c2x-compat handling; for
struct [[deprecated]]; and for the [[__fallthrough__]] spelling of
[[fallthrough]] in the case of valid fallthrough attributes.

Tested for x86_64-pc-linux-gnu.

* gcc.dg/c11-attr-syntax-1.c, gcc.dg/c11-attr-syntax-2.c,
gcc.dg/c11-attr-syntax-3.c, gcc.dg/c2x-attr-syntax-4.c: New tests.
* gcc.dg/c2x-attr-deprecated-1.c: Also test struct [[deprecated]].
* gcc.dg/c2x-attr-fallthrough-1.c: Also test [[__fallthrough__]].

From-SVN: r278418
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c11-attr-syntax-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c11-attr-syntax-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c11-attr-syntax-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c2x-attr-deprecated-1.c
gcc/testsuite/gcc.dg/c2x-attr-fallthrough-1.c
gcc/testsuite/gcc.dg/c2x-attr-syntax-4.c [new file with mode: 0644]