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