Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / attr-invalid.c
blob9cb645415480e87fbeccc7c42ac4401e3d0b8faf
1 /* { dg-do compile } */
2 /* { dg-options "" } */
4 #define CONCAT_(A,B) A ## B
5 #define CONCAT(A,B) CONCAT_(A,B)
7 #define ATTR __attribute__((AT))
8 #define ATSYM(suf) CONCAT (AT, CONCAT_ (_, suf))
10 #define AT noinline
12 typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */
14 typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */
16 struct ATSYM(struct) {
17 char dummy ATTR; /* { dg-warning "attribute ignored" "" } */
18 } ATTR; /* { dg-warning "does not apply to types" "" } */
20 int ATSYM(var) ATTR; /* { dg-warning "attribute ignored" "" } */
22 int ATSYM(fn_knrarg) (arg)
23 int arg ATTR; /* { dg-warning "attribute ignored" "" } */
24 { return 0; }
26 int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" "" } */
28 int ATSYM(fn_vars) (void) {
29 static int svar ATTR; /* { dg-warning "attribute ignored" "" } */
30 auto int lvar ATTR; /* { dg-warning "attribute ignored" "" } */
31 return 0;
35 #undef AT
36 #define AT used
38 typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */
40 typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */
42 struct ATSYM(struct) {
43 char dummy ATTR; /* { dg-warning "attribute ignored" "" } */
44 } ATTR; /* { dg-warning "does not apply to types" "" } */
46 int ATSYM(var) ATTR;
48 int ATSYM(fn_knrarg) (arg)
49 int arg ATTR; /* { dg-warning "attribute ignored" "" } */
50 { return 0; }
52 int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" "" } */
54 int ATSYM(fn_vars) (void) {
55 static int svar ATTR;
56 auto int lvar ATTR; /* { dg-warning "attribute ignored" "" } */
57 return 0;