summaryrefslogtreecommitdiff
path: root/test/Sema/pragma-ms_struct.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
commit9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch)
tree47df2c12b57214af6c31e47404b005675b8b7ffc /test/Sema/pragma-ms_struct.c
parentf73d5f23a889b93d89ddef61ac0995df40286bb8 (diff)
Notes
Diffstat (limited to 'test/Sema/pragma-ms_struct.c')
-rw-r--r--test/Sema/pragma-ms_struct.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/Sema/pragma-ms_struct.c b/test/Sema/pragma-ms_struct.c
index 6533320e518d4..e2c5ff1f481e4 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}}
+};