From: Ted Kremenek Date: Fri, 27 Feb 2009 16:48:08 +0000 (+0000) Subject: Add test case for PR 3675. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=beba7f47d873abe0a532753556511d0dabbb41fa;p=clang Add test case for PR 3675. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65635 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/PR3675.c b/test/Sema/PR3675.c new file mode 100644 index 0000000000..9c86d8cbcf --- /dev/null +++ b/test/Sema/PR3675.c @@ -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;