|
1 | | -/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify=expected,c89only -pedantic -Wno-declaration-after-statement -Wno-c11-extensions %s |
2 | | - RUN: %clang_cc1 -std=c89 -fsyntax-only -verify=expected,c89only -pedantic -Wno-declaration-after-statement -Wno-c11-extensions -fno-signed-char %s |
3 | | - RUN: %clang_cc1 -std=c99 -fsyntax-only -verify=expected,c99untilc2x -pedantic -Wno-c11-extensions %s |
4 | | - RUN: %clang_cc1 -std=c11 -fsyntax-only -verify=expected,c99untilc2x -pedantic %s |
5 | | - RUN: %clang_cc1 -std=c17 -fsyntax-only -verify=expected,c99untilc2x -pedantic %s |
6 | | - RUN: %clang_cc1 -std=c2x -fsyntax-only -verify=expected,c2xandup -pedantic %s |
| 1 | +/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify=expected,c89only,c17andearlier -pedantic -Wno-declaration-after-statement -Wno-c11-extensions %s |
| 2 | + RUN: %clang_cc1 -std=c89 -fsyntax-only -verify=expected,c89only,c17andearlier -pedantic -Wno-declaration-after-statement -Wno-c11-extensions -fno-signed-char %s |
| 3 | + RUN: %clang_cc1 -std=c99 -fsyntax-only -verify=expected,c99untilc2x,c17andearlier -pedantic -Wno-c11-extensions %s |
| 4 | + RUN: %clang_cc1 -std=c11 -fsyntax-only -verify=expected,c99untilc2x,c17andearlier -pedantic %s |
| 5 | + RUN: %clang_cc1 -std=c17 -fsyntax-only -verify=expected,c99untilc2x,c17andearlier -pedantic %s |
| 6 | + RUN: %clang_cc1 -std=c23 -fsyntax-only -verify=expected,c2xandup -pedantic %s |
7 | 7 | */ |
8 | 8 |
|
9 | 9 | /* The following are DRs which do not require tests to demonstrate |
@@ -245,13 +245,13 @@ int dr032 = (1, 2); /* expected-warning {{left operand of comma operator has no |
245 | 245 | * Questions about definition of functions without a prototype |
246 | 246 | */ |
247 | 247 | void dr035_1(a, b) /* expected-warning {{a function definition without a prototype is deprecated in all versions of C and is not supported in C23}} */ |
248 | | - int a(enum b {x, y}); /* expected-warning {{declaration of 'enum b' will not be visible outside of this function}} */ |
| 248 | + int a(enum b {x, y}); /* c17andearlier-warning {{declaration of 'enum b' will not be visible outside of this function}} */ |
249 | 249 | int b; { |
250 | 250 | int test = x; /* expected-error {{use of undeclared identifier 'x'}} */ |
251 | 251 | } |
252 | 252 |
|
253 | 253 | void dr035_2(c) /* expected-warning {{a function definition without a prototype is deprecated in all versions of C and is not supported in C23}} */ |
254 | | - enum m{q, r} c; { /* expected-warning {{declaration of 'enum m' will not be visible outside of this function}} */ |
| 254 | + enum m{q, r} c; { /* c17andearlier-warning {{declaration of 'enum m' will not be visible outside of this function}} */ |
255 | 255 | /* FIXME: This should be accepted because the scope of m, q, and r ends at |
256 | 256 | * the closing brace of the function per C89 6.1.2.1. |
257 | 257 | */ |
|
0 commit comments