ORCA-C/Tests/Conformance/C4.4.2.1.CC
Stephen Heumann 072f8be6bc 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.
2022-10-13 18:52:18 -05:00

23 lines
627 B
C++

/* Conformance Test 4.4.2.1: Ensure compile accepts missing declarators */
extern struct S; /* forward-declared struct type, */
/* storage class ignored */
struct S {int a;
float x;};
struct S;
static enum E {a, b, c}; /* storage class ignored */
extern enum {x, y, z};
main ()
{
struct S; /* different from the global one */
volatile const register struct T;
extern union U {int i;
long l;};
printf ("Passed Conformance Test 4.4.2.1\n");
}