diff options
author | Martin Uecker <muecker@gwdg.de> | 2020-11-07 00:48:33 +0100 |
---|---|---|
committer | Martin Uecker <muecker@gwdg.de> | 2020-11-07 09:13:49 +0100 |
commit | 8b7a9a249a63e066cff6e95db05a3158b4cc56cc (patch) | |
tree | ed7e18eaa5f43740b7693c50928401d0a7c58fa2 /gcc/testsuite/c-c++-common | |
parent | 7fc0f78c3f43af1967cb7b1ee8f4947f3b890aa2 (diff) | |
download | gcc-8b7a9a249a63e066cff6e95db05a3158b4cc56cc.zip gcc-8b7a9a249a63e066cff6e95db05a3158b4cc56cc.tar.gz gcc-8b7a9a249a63e066cff6e95db05a3158b4cc56cc.tar.bz2 |
C Parser: Implement mixing of labels and code.
Implement mixing of labels and code as adopted for C2X
and process some std-attributes on labels.
2020-11-06 Martin Uecker <muecker@gwdg.de>
gcc/
* doc/extend.texi: Document mixing labels and code.
* doc/invoke.texi: Likewise.
gcc/c/
* c-parser.c (c_parser_label): Implement mixing of labels and code.
(c_parser_all_labels): Likewise.
gcc/testsuite/
* c-c++-common/attr-fallthrough-2.c: Update compiler flags.
* c-c++-common/Wimplicit-fallthrough-20.c: Adapt test.
* gcc.dg/20031223-1.c: Update compiler flags and adapt test.
* gcc.dg/c11-labels-1.c: New test.
* gcc.dg/c11-labels-2.c: New test.
* gcc.dg/c11-labels-3.c: New test.
* gcc.dg/c2x-attr-syntax-3.c: Adapt test.
* gcc.dg/c2x-labels-1.c: New test.
* gcc.dg/c2x-labels-2.c: New test.
* gcc.dg/c2x-labels-3.c: New test.
* gcc.dg/decl-9.c: Update compiler flags and add error.
* gcc.dg/gomp/barrier-2.c: Update compiler flags and add warning.
* gcc.dg/gomp/declare-simd-5.c: Update compiler flags and adapt test.
* gcc.dg/gomp/declare-variant-2.c: Update compiler flags and add error.
* gcc.dg/label-compound-stmt-1.c: Update compiler flags.
* gcc.dg/parse-decl-after-label.c: Update compiler flags.
Diffstat (limited to 'gcc/testsuite/c-c++-common')
-rw-r--r-- | gcc/testsuite/c-c++-common/Wimplicit-fallthrough-20.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/attr-fallthrough-2.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-20.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-20.c index d37a840..810c331 100644 --- a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-20.c +++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-20.c @@ -27,13 +27,13 @@ g (int i) switch (i) { case -1: - __attribute__((used)); /* { dg-warning "ignored|only attribute" } */ + __attribute__((used)); /* { dg-warning "empty declaration" } */ default: - __attribute__((used)); /* { dg-warning "ignored|only attribute" } */ + __attribute__((used)); /* { dg-warning "empty declaration" } */ case 1: return 6; case 2 ... 4: - __attribute__((used)); /* { dg-warning "ignored|only attribute" } */ + __attribute__((used)); /* { dg-warning "empty declaration" } */ case 5: return 7; } diff --git a/gcc/testsuite/c-c++-common/attr-fallthrough-2.c b/gcc/testsuite/c-c++-common/attr-fallthrough-2.c index e8659e5..be61d5e 100644 --- a/gcc/testsuite/c-c++-common/attr-fallthrough-2.c +++ b/gcc/testsuite/c-c++-common/attr-fallthrough-2.c @@ -1,6 +1,6 @@ /* PR c/7652 */ /* { dg-do compile } */ -/* { dg-options "-Wall -Wextra -Wpedantic -Wno-unused -Wno-implicit-fallthrough" } */ +/* { dg-options "-Wall -Wextra -Wno-unused -Wno-implicit-fallthrough" } */ extern void bar (int); void |