diff options
Diffstat (limited to 'test/Sema/extern-redecl.c')
-rw-r--r-- | test/Sema/extern-redecl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Sema/extern-redecl.c b/test/Sema/extern-redecl.c index 9a085de0c0..64885a08d3 100644 --- a/test/Sema/extern-redecl.c +++ b/test/Sema/extern-redecl.c @@ -33,3 +33,12 @@ void test3declarer() { extern int test3_array[]; int x = sizeof(test3_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} } + +void test4() { + extern int test4_array[]; + { + extern int test4_array[100]; + int x = sizeof(test4_array); // fine + } + int x = sizeof(test4_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}} +} |