diff options
Diffstat (limited to 'test/SemaCXX/anonymous-union.cpp')
-rw-r--r-- | test/SemaCXX/anonymous-union.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaCXX/anonymous-union.cpp b/test/SemaCXX/anonymous-union.cpp index 5f84bcca28..553ae658e5 100644 --- a/test/SemaCXX/anonymous-union.cpp +++ b/test/SemaCXX/anonymous-union.cpp @@ -155,3 +155,23 @@ namespace test4 { (void) a.us1; // expected-error {{private member}} } } + +typedef void *voidPtr; + +void f2() { + union { int **ctxPtr; void **voidPtr; }; +} + +void foo_PR6741() { + union { + char *m_a; + int *m_b; + }; + + if(1) { + union { + char *m_a; + int *m_b; + }; + } +} |