diff options
Diffstat (limited to 'test/SemaCXX/anonymous-union.cpp')
-rw-r--r-- | test/SemaCXX/anonymous-union.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/SemaCXX/anonymous-union.cpp b/test/SemaCXX/anonymous-union.cpp index fde27b049d88..46d426cf0c0f 100644 --- a/test/SemaCXX/anonymous-union.cpp +++ b/test/SemaCXX/anonymous-union.cpp @@ -80,10 +80,14 @@ union { // expected-error{{anonymous unions at namespace or global scope must be }; static union { - int int_val2; + int int_val2; // expected-note{{previous definition is here}} float float_val2; }; +void PR21858() { + void int_val2(); // expected-error{{redefinition of 'int_val2' as different kind of symbol}} +} + void f() { int_val2 = 0; float_val2 = 0.0; |