From 072f8be6bc9359f2608643cc09c90c0a80e21908 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Thu, 13 Oct 2022 18:52:18 -0500 Subject: [PATCH] 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 f263066f616, this constraint is now enforced, so those cases would (properly) give errors. --- Tests/Conformance/C4.4.2.1.CC | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Tests/Conformance/C4.4.2.1.CC b/Tests/Conformance/C4.4.2.1.CC index dcd4004..499e101 100644 --- a/Tests/Conformance/C4.4.2.1.CC +++ b/Tests/Conformance/C4.4.2.1.CC @@ -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;};