Adjust test of missing declarators to cover only cases that are legal.

Previously, it included some instances that violate the standard constraint that a declaration must declare a declarator, a tag, or an enum constant. As of commit f263066f61, this constraint is now enforced, so those cases would (properly) give errors.
This commit is contained in:
Stephen Heumann 2022-10-13 18:52:18 -05:00
parent b8b7dc2c2b
commit 072f8be6bc
1 changed files with 9 additions and 6 deletions

View File

@ -1,17 +1,20 @@
/* Conformance Test 4.4.2.1: Ensure compile accepts missing declarators */
struct {int a; /* can't use it, but it's legal */
float x;};
extern struct S; /* forward-declared struct type, */
/* storage class ignored */
int ; /* nothing declared, but it's legal */
struct S {int a;
float x;};
struct S;
static enum E {a, b, c}; /* storage class ignored */
extern enum {x, y, z};
main ()
{
struct {double d;
short s;};
extended;
struct S; /* different from the global one */
volatile const register struct T;
extern union U {int i;
long l;};