OSDN Git Service

* config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Compare
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / attr-invalid.c
1 /* { dg-do compile } */
2 /* { dg-options "" } */
3
4 #define CONCAT_(A,B) A ## B
5 #define CONCAT(A,B) CONCAT_(A,B)
6
7 #define ATTR __attribute__((AT))
8 #define ATSYM(suf) CONCAT (AT, CONCAT_ (_, suf))
9
10 #define AT noinline
11
12 typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */
13
14 typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */
15
16 struct ATSYM(struct) {
17   char dummy ATTR; /* { dg-warning "attribute ignored" "" } */
18 } ATTR; /* { dg-warning "does not apply to types" "" } */
19
20 int ATSYM(var) ATTR;  /* { dg-warning "attribute ignored" "" } */
21
22 int ATSYM(fn_knrarg) (arg)
23   int arg ATTR; /* { dg-warning "attribute ignored" "" } */
24 {}
25
26 int ATSYM(fn_isoarg) (int arg ATTR) {} /* { dg-warning "attribute ignored" "" } */
27
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 }
32
33
34 #undef AT
35 #define AT used
36
37 typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */
38
39 typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */
40
41 struct ATSYM(struct) {
42   char dummy ATTR; /* { dg-warning "attribute ignored" "" } */
43 } ATTR; /* { dg-warning "does not apply to types" "" } */
44
45 int ATSYM(var) ATTR;  /* { dg-warning "attribute ignored" "" } */
46
47 int ATSYM(fn_knrarg) (arg)
48   int arg ATTR; /* { dg-warning "attribute ignored" "" } */
49 {}
50
51 int ATSYM(fn_isoarg) (int arg ATTR) {} /* { dg-warning "attribute ignored" "" } */
52
53 int ATSYM(fn_vars) (void) {
54   static int svar ATTR; /* { dg-warning "attribute ignored" "" } */
55   auto int lvar ATTR; /* { dg-warning "attribute ignored" "" } */
56 }