aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/array-bounds-zero-length-elem-gh64564.c
blob: 1aaf01d82011bce65a8f53b863af419a71d9e1a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -triple i686-apple-darwin -verify %s

int a[][0]; // expected-warning {{tentative array definition assumed to have one element}}
void gh64564_1(void) {
  int b = a[0x100000000][0];
}

typedef struct {} S;
S s[]; // expected-warning {{tentative array definition assumed to have one element}}
void gh64564_2(void) {
  S t = s[0x100000000];
}