[cfe-commits] r65635 - /cfe/trunk/test/Sema/PR3675.c

Ted Kremenek kremenek at apple.com
Fri Feb 27 08:48:08 PST 2009


Author: kremenek
Date: Fri Feb 27 10:48:08 2009
New Revision: 65635

URL: http://llvm.org/viewvc/llvm-project?rev=65635&view=rev
Log:
Add test case for PR 3675.

Added:
    cfe/trunk/test/Sema/PR3675.c

Added: cfe/trunk/test/Sema/PR3675.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/PR3675.c?rev=65635&view=auto

==============================================================================
--- cfe/trunk/test/Sema/PR3675.c (added)
+++ cfe/trunk/test/Sema/PR3675.c Fri Feb 27 10:48:08 2009
@@ -0,0 +1,16 @@
+// RUN: clang -verify %s
+//
+// This example was reduced from actual code in Wine 1.1.13.  GCC accepts this
+// code, while the correct behavior is to reject it.
+//
+
+typedef struct _IRP {
+  union {
+    struct {
+      union {} u; // expected-note{{previous declaration is here}}
+      struct {
+        union {} u; // expected-error{{error: member of anonymous struct redeclares 'u'}}
+      };
+    } Overlay;
+  } Tail;
+} IRP;





More information about the cfe-commits mailing list