blob: 47071a383d6d0100b6f15172bde45ec14394207d [file] [log] [blame]
Chandler Carrutha64aedb2010-10-06 06:50:05 +00001// RUN: %clang_cc1 %s -fsyntax-only -Wmicrosoft -verify -fms-extensions
2
3
4struct A
5{
6 int a[]; /* expected-warning {{flexible array member 'a' in otherwise empty struct is a Microsoft extension}} */
7};
8
9struct C {
10 int l;
11 union {
12 int c1[]; /* expected-warning {{flexible array member 'c1' in a union is a Microsoft extension}} */
13 char c2[]; /* expected-warning {{flexible array member 'c2' in a union is a Microsoft extension}} */
14 };
15};
16
17
18struct D {
19 int l;
20 int D[];
21};
Francois Picheta3108062010-10-18 15:01:13 +000022
23
24enum ENUM1; // expected-warning {{forward references to 'enum' types are a Microsoft extension}}
25enum ENUM1 var1 = 3;
26enum ENUM1* var2 = 0;
27
28
29enum ENUM2 {
30 ENUM2_a = (enum ENUM2) 4,
31 ENUM2_b = 0x9FFFFFFF, // expected-warning {{enumerator value is not representable in the underlying type 'int'}}
32 ENUM2_c = 0x100000000 // expected-warning {{enumerator value is not representable in the underlying type 'int'}}
33};