clang/test/Sema/array-bounds-zero-length-elem-gh64564.c
raw| 1 | // RUN: %clang_cc1 -triple i686-apple-darwin -verify %s |
| 2 | |
| 3 | int a[][0]; // expected-warning {{tentative array definition assumed to have one element}} |
| 4 | void gh64564_1(void) { |
| 5 | int b = a[0x100000000][0]; |
| 6 | } |
| 7 | |
| 8 | typedef struct {} S; |
| 9 | S s[]; // expected-warning {{tentative array definition assumed to have one element}} |
| 10 | void gh64564_2(void) { |
| 11 | S t = s[0x100000000]; |
| 12 | } |