diff options
Diffstat (limited to 'test/Sema/pragma-ms_struct.c')
-rw-r--r-- | test/Sema/pragma-ms_struct.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/Sema/pragma-ms_struct.c b/test/Sema/pragma-ms_struct.c index 6533320..e2c5ff1 100644 --- a/test/Sema/pragma-ms_struct.c +++ b/test/Sema/pragma-ms_struct.c @@ -25,7 +25,7 @@ struct { } __attribute__((__ms_struct__)) t1; struct S { - double __attribute__((ms_struct)) d; // expected-warning {{'ms_struct' attribute ignored}} + double __attribute__((ms_struct)) d; // expected-warning {{'ms_struct' attribute only applies to struct or union}} unsigned long bf_1 : 12; unsigned long : 0; unsigned long bf_2 : 12; @@ -36,7 +36,7 @@ enum A = 0, B, C -} __attribute__((ms_struct)) e1; // expected-warning {{'ms_struct' attribute ignored}} +} __attribute__((ms_struct)) e1; // expected-warning {{'ms_struct' attribute only applies to struct or union}} // rdar://10513599 #pragma ms_struct on @@ -52,10 +52,12 @@ typedef struct void *pv1; Foo foo; unsigned short fInited : 1; -void *pv2; -} PackOddity; +void *pv2; +} PackOddity; #pragma ms_struct off static int arr[sizeof(PackOddity) == 40 ? 1 : -1]; +struct __declspec(ms_struct) bad { // expected-warning {{__declspec attribute 'ms_struct' is not supported}} +}; |