forked from OSchip/llvm-project
Remove the part of test/Sema/pragma-pack-2.c that has irregular "#pragma pack"s.
Before r151307 this part worked without compiler errors but now it only verifies that our handling of irregular pragmas is broken compared to gcc, it has no practical usefulness; it creates invalid structs that cannot be used for 'offsetof' testing. If we later decide to handle irregular pragmas without compiler errors we can put back this part. llvm-svn: 152480
This commit is contained in:
parent
7133505936
commit
0900a74ddf
|
@ -19,52 +19,6 @@ struct s1 {
|
|||
extern int a1[offsetof(struct s1, f1) == 2 ? 1 : -1];
|
||||
#pragma pack(pop)
|
||||
|
||||
// Test scope of definition
|
||||
|
||||
#pragma pack(push, 2)
|
||||
struct s2_0 { // expected-error {{expected ';'}}
|
||||
#pragma pack(pop) // expected-error {{type name}} expected-error {{member name}} expected-warning {{type specifier}}
|
||||
char f0;
|
||||
int f1;
|
||||
};
|
||||
extern int a2_0[offsetof(struct s2_0, f1) == 2 ? 1 : -1];
|
||||
|
||||
struct s2_1 {
|
||||
char f0; // expected-error {{expected ';'}}
|
||||
#pragma pack(push, 2) // expected-error {{type name}} expected-error {{member name}} expected-warning {{type specifier}}
|
||||
int f1; // expected-error {{expected ';'}}
|
||||
#pragma pack(pop) // expected-error {{type name}} expected-error {{member name}} expected-warning {{type specifier}}
|
||||
};
|
||||
extern int a2_1[offsetof(struct s2_1, f1) == 4 ? 1 : -1];
|
||||
|
||||
struct s2_2 {
|
||||
char f0;
|
||||
int f1; // expected-error {{expected ';'}}
|
||||
#pragma pack(push, 2) // expected-error {{type name}} expected-error {{member name}} expected-warning {{type specifier}}
|
||||
};
|
||||
#pragma pack(pop)
|
||||
extern int a2_2[offsetof(struct s2_2, f1) == 4 ? 1 : -1];
|
||||
|
||||
struct s2_3 {
|
||||
char f0; // expected-error {{expected ';'}}
|
||||
#pragma pack(push, 2) // expected-error {{type name}} expected-error {{member name}} expected-warning {{type specifier}}
|
||||
struct s2_3_0 {
|
||||
#pragma pack(pop)
|
||||
int f0;
|
||||
} f1;
|
||||
};
|
||||
extern int a2_3[offsetof(struct s2_3, f1) == 2 ? 1 : -1];
|
||||
|
||||
struct s2_4 {
|
||||
char f0;
|
||||
struct s2_4_0 {
|
||||
int f0; // expected-error {{expected ';'}}
|
||||
#pragma pack(push, 2) // expected-error {{type name}} expected-error {{member name}} expected-warning {{type specifier}}
|
||||
} f1; // expected-error {{expected ';'}}
|
||||
#pragma pack(pop) // expected-error {{type name}} expected-error {{member name}} expected-warning {{type specifier}}
|
||||
};
|
||||
extern int a2_4[offsetof(struct s2_4, f1) == 4 ? 1 : -1];
|
||||
|
||||
#pragma pack(1)
|
||||
struct s3_0 {
|
||||
char f0;
|
||||
|
|
Loading…
Reference in New Issue