blob: 8fe48f7377ec1403effe466a9c2d7384ad324f94 [file] [log] [blame]
Richard Smith099e7f62011-12-19 06:19:21 +00001// RUN: %clang_cc1 -pedantic-errors -std=c++98 -emit-pch %s -o %t
2// RUN: %clang_cc1 -pedantic-errors -std=c++98 -include-pch %t -verify %s
3
4// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t-cxx11
5// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t-cxx11 -verify %s
6
7#ifndef HEADER_INCLUDED
8
9#define HEADER_INCLUDED
10extern const int a;
11const int b = a;
12
13#else
14
15const int a = 5;
16typedef int T[b]; // expected-error {{variable length array}} expected-error {{must be an integer constant expression}}
17typedef int T[5];
18
19#endif