[cfe-commits] r152480 - /cfe/trunk/test/Sema/pragma-pack-2.c
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Mar 9 19:20:53 PST 2012
Author: akirtzidis
Date: Fri Mar 9 21:20:52 2012
New Revision: 152480
URL: http://llvm.org/viewvc/llvm-project?rev=152480&view=rev
Log:
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.
Modified:
cfe/trunk/test/Sema/pragma-pack-2.c
Modified: cfe/trunk/test/Sema/pragma-pack-2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/pragma-pack-2.c?rev=152480&r1=152479&r2=152480&view=diff
==============================================================================
--- cfe/trunk/test/Sema/pragma-pack-2.c (original)
+++ cfe/trunk/test/Sema/pragma-pack-2.c Fri Mar 9 21:20:52 2012
@@ -19,52 +19,6 @@
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;
More information about the cfe-commits
mailing list