| [c0aa336] | 1 | // 
 | 
|---|
 | 2 | // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
 | 
|---|
 | 3 | //
 | 
|---|
 | 4 | // The contents of this file are covered under the licence agreement in the
 | 
|---|
 | 5 | // file "LICENCE" distributed with Cforall.
 | 
|---|
 | 6 | // 
 | 
|---|
| [dc8511c] | 7 | // attributes.cfa -- 
 | 
|---|
| [c0aa336] | 8 | // 
 | 
|---|
 | 9 | // Author           : Peter A. Buhr
 | 
|---|
 | 10 | // Created On       : Mon Feb  6 16:07:02 2017
 | 
|---|
 | 11 | // Last Modified By : Peter A. Buhr
 | 
|---|
| [ea837e94] | 12 | // Last Modified On : Mon Mar 15 13:53:31 2021
 | 
|---|
 | 13 | // Update Count     : 38
 | 
|---|
| [c0aa336] | 14 | // 
 | 
|---|
 | 15 | 
 | 
|---|
 | 16 | 
 | 
|---|
 | 17 | // label attribute
 | 
|---|
 | 18 | int la() {
 | 
|---|
 | 19 |   L: __attribute__(( unused )) 1;
 | 
|---|
 | 20 | }
 | 
|---|
 | 21 | 
 | 
|---|
 | 22 | 
 | 
|---|
 | 23 | // aggregate_name
 | 
|---|
| [5282010] | 24 | struct __attribute__(( unused )) {} Dummy;
 | 
|---|
| [c0aa336] | 25 | struct __attribute__(( unused )) Agn1;
 | 
|---|
 | 26 | struct __attribute__(( unused )) Agn2 {};
 | 
|---|
 | 27 | enum __attribute__(( unused )) { E1 };
 | 
|---|
 | 28 | enum __attribute__(( unused )) Agn3;
 | 
|---|
 | 29 | enum __attribute__(( packed )) Agn3 { E2 };
 | 
|---|
 | 30 | #ifdef __CFA__
 | 
|---|
| [132d276] | 31 | struct __attribute__(( unused )) {} ( int );
 | 
|---|
 | 32 | struct __attribute__(( unused )) Agn4 {} ( int );
 | 
|---|
| [c0aa336] | 33 | #endif // __CFA__
 | 
|---|
 | 34 | 
 | 
|---|
 | 35 | 
 | 
|---|
 | 36 | // field_declaring_list
 | 
|---|
 | 37 | struct Fdl {
 | 
|---|
 | 38 |     int f1 __attribute__(( unused ));
 | 
|---|
 | 39 |     int __attribute__(( unused )) f2;
 | 
|---|
 | 40 |     int __attribute__(( unused )) f3 __attribute__(( unused ));
 | 
|---|
 | 41 |     __attribute__(( unused )) int f4;
 | 
|---|
 | 42 |     __attribute__(( unused )) int f5 __attribute__(( unused ));
 | 
|---|
 | 43 |     __attribute__(( used )) int f6 __attribute__(( packed )), f7 __attribute__(( unused )) __attribute__(( unused )), __attribute__(( used )) f8 __attribute__(( unused ));
 | 
|---|
| [ea837e94] | 44 |     int * f9 __attribute__(( unused ));
 | 
|---|
 | 45 |     __attribute__(( used )) int __attribute__(( unused )) * f10;
 | 
|---|
 | 46 |     int ( ( * f11 __attribute__(( unused )) ) __attribute__(( unused )) );
 | 
|---|
 | 47 |     int ( ( __attribute__(( unused )) * f12  __attribute__(( unused )) ) __attribute__(( unused )) );
 | 
|---|
 | 48 |     int ( ( __attribute__(( unused )) * (f13)  __attribute__(( unused )) ) __attribute__(( unused )) );
 | 
|---|
 | 49 |     int ( ( ( __attribute__(( unused )) * (f14) )  __attribute__(( unused )) ) __attribute__(( unused )) );
 | 
|---|
| [c0aa336] | 50 | };
 | 
|---|
 | 51 | 
 | 
|---|
 | 52 | 
 | 
|---|
 | 53 | // asm_name_opt
 | 
|---|
 | 54 | int f() asm( "xyz" ) __attribute__(( unused ));
 | 
|---|
 | 55 | 
 | 
|---|
 | 56 | 
 | 
|---|
 | 57 | // variable_declarator
 | 
|---|
 | 58 | const __attribute__(( used )) int vd1 __attribute__(( used )), __attribute__(( unused )) vd2;
 | 
|---|
 | 59 | const __attribute__(( used )) int __attribute__(( used )) * __attribute__(( used )) vd3 __attribute__(( used )), __attribute__(( unused )) (* __attribute__(( unused )) (vd4)) __attribute__(( used ));
 | 
|---|
 | 60 | const __attribute__(( used )) int __attribute__(( used )) vd5[5] __attribute__(( used )), __attribute__(( unused )) ((vd6)[5]) __attribute__(( used ));
 | 
|---|
 | 61 | const __attribute__(( used )) int __attribute__(( used )) (* __attribute__(( used )) vd7)() __attribute__(( used )), __attribute__(( unused )) ((* __attribute__(( used )) vd8)()) __attribute__(( used ));
 | 
|---|
| [ea837e94] | 62 | const __attribute__(( used )) int __attribute__(( used )) ( __attribute__(( used )) * vd9)() __attribute__(( used )), __attribute__(( unused )) (( __attribute__(( used )) * vd10)()) __attribute__(( used ));
 | 
|---|
| [c0aa336] | 63 | 
 | 
|---|
 | 64 | // function_declarator
 | 
|---|
 | 65 | __attribute__(( unused )) int f1() __attribute__(( used ));
 | 
|---|
 | 66 | __attribute__(( unused )) int f1() {}
 | 
|---|
 | 67 | __attribute__(( unused )) int * __attribute__(( unused )) * const __attribute__(( unused )) f2() __attribute__(( used ));
 | 
|---|
 | 68 | __attribute__(( unused )) int * __attribute__(( unused )) * const __attribute__(( unused )) f2() {}
 | 
|---|
 | 69 | __attribute__(( unused )) int (* __attribute__(( unused )) f3(int))[] __attribute__(( used ));
 | 
|---|
| [ea837e94] | 70 | __attribute__(( unused )) int ( __attribute__(( unused )) * __attribute__(( unused )) f4(int))[] __attribute__(( used ));
 | 
|---|
 | 71 | __attribute__(( unused )) int (* __attribute__(( unused )) f5(int p))[] {}
 | 
|---|
 | 72 | __attribute__(( unused )) int ( __attribute__(( unused )) * (f6)(int p))[] {}
 | 
|---|
 | 73 | __attribute__(( unused )) int (* __attribute__(( unused )) f7())(int) __attribute__(( used ));
 | 
|---|
 | 74 | __attribute__(( unused )) int (* __attribute__(( unused )) f8())(int) {}
 | 
|---|
 | 75 | __attribute__(( unused )) int ( __attribute__(( unused )) * f9())(int) {}
 | 
|---|
 | 76 | __attribute__(( unused )) int ( __attribute__(( unused )) * (f10)())(int) {}
 | 
|---|
| [c0aa336] | 77 | 
 | 
|---|
 | 78 | 
 | 
|---|
 | 79 | // variable_type_redeclarator
 | 
|---|
 | 80 | typedef int t1, t2, t3, t4, t5, t6, t7, t8;
 | 
|---|
 | 81 | int vtr() {
 | 
|---|
 | 82 |     // redefine typedef name in new scope
 | 
|---|
 | 83 |     __attribute__(( unused )) int __attribute__(( unused )) t1 __attribute__(( used ));
 | 
|---|
 | 84 |     __attribute__(( unused )) int __attribute__(( unused )) (* (* t2 __attribute__(( unused )) ) __attribute__(( unused )) ) __attribute__(( unused ));
 | 
|---|
 | 85 |     __attribute__(( unused )) int __attribute__(( unused )) t3[5] __attribute__(( unused ));
 | 
|---|
 | 86 |     __attribute__(( unused )) int __attribute__(( unused )) (* (* __attribute__(( unused )) t4[5]) __attribute__(( unused )) ) __attribute__(( unused ));
 | 
|---|
| [ea837e94] | 87 |     __attribute__(( unused )) int __attribute__(( unused )) ( __attribute__(( unused )) * ( __attribute__(( unused )) * t5[5]) __attribute__(( unused )) ) __attribute__(( unused ));
 | 
|---|
 | 88 |     __attribute__(( unused )) int __attribute__(( unused )) t6() __attribute__(( unused ));
 | 
|---|
| [c0aa336] | 89 |     __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) ((t6))() __attribute__(( unused ));
 | 
|---|
 | 90 | }
 | 
|---|
 | 91 | 
 | 
|---|
 | 92 | 
 | 
|---|
 | 93 | // identifier_parameter_declarator
 | 
|---|
 | 94 | int ipd1( __attribute__(( unused )) int __attribute__(( unused )) p __attribute__(( unused )),
 | 
|---|
 | 95 |           __attribute__(( unused )) int __attribute__(( unused )) q __attribute__(( unused )) );
 | 
|---|
 | 96 | int ipd1( __attribute__(( unused )) int __attribute__(( unused )) p __attribute__(( unused )),
 | 
|---|
 | 97 |           __attribute__(( unused )) int __attribute__(( unused )) q __attribute__(( unused )) ) {}
 | 
|---|
 | 98 | int ipd2( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) p __attribute__(( unused )),
 | 
|---|
 | 99 |           __attribute__(( unused )) int __attribute__(( unused )) (* (q)) __attribute__(( unused )) );
 | 
|---|
 | 100 | int ipd2( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) p __attribute__(( unused )),
 | 
|---|
 | 101 |           __attribute__(( unused )) int __attribute__(( unused )) (* (q)) __attribute__(( unused )) ) {}
 | 
|---|
 | 102 | int ipd3( __attribute__(( unused )) int __attribute__(( unused )) p[] __attribute__(( unused )),
 | 
|---|
 | 103 |           __attribute__(( unused )) int __attribute__(( unused )) ((q)[]) __attribute__(( unused )) );
 | 
|---|
 | 104 | int ipd3( __attribute__(( unused )) int __attribute__(( unused )) p[] __attribute__(( unused )),
 | 
|---|
 | 105 |           __attribute__(( unused )) int __attribute__(( unused )) ((q)[]) __attribute__(( unused )) ) {}
 | 
|---|
 | 106 | int ipd4( __attribute__(( unused )) int __attribute__(( unused )) p() __attribute__(( unused )),
 | 
|---|
 | 107 |           __attribute__(( unused )) int __attribute__(( unused )) ((q)()) __attribute__(( unused )) );
 | 
|---|
 | 108 | int ipd4( __attribute__(( unused )) int __attribute__(( unused )) p() __attribute__(( unused )),
 | 
|---|
 | 109 |           __attribute__(( unused )) int __attribute__(( unused )) ((q)()) __attribute__(( unused )) ) {}
 | 
|---|
 | 110 | 
 | 
|---|
 | 111 | 
 | 
|---|
 | 112 | // type_parameter_redeclarator
 | 
|---|
 | 113 | typedef int Foo;
 | 
|---|
 | 114 | int tpr1( __attribute__(( unused )) int __attribute__(( unused )) Foo __attribute__(( unused )) );
 | 
|---|
 | 115 | int tpr2( __attribute__(( unused )) int __attribute__(( unused )) (* __attribute__(( unused )) (* __attribute__(( unused )) Foo) __attribute__(( unused )) ) __attribute__(( unused )) );
 | 
|---|
 | 116 | int tpr3( __attribute__(( unused )) int __attribute__(( unused )) Foo[]  __attribute__(( unused )));
 | 
|---|
 | 117 | int tpr4( __attribute__(( unused )) int __attribute__(( unused )) ( __attribute__(( unused )) Foo[5] __attribute__(( unused )) ) );
 | 
|---|
 | 118 | int tpr5( __attribute__(( unused )) int __attribute__(( unused )) (*Foo)() __attribute__(( unused )) );
 | 
|---|
 | 119 | int tpr6( __attribute__(( unused )) int __attribute__(( unused )) Foo() __attribute__(( unused )) );
 | 
|---|
 | 120 | int tpr7( __attribute__(( unused )) int __attribute__(( unused )) ( __attribute__(( unused )) Foo( __attribute__(( unused )) int __attribute__(( unused )) ) ) );
 | 
|---|
 | 121 | 
 | 
|---|
 | 122 | 
 | 
|---|
 | 123 | // abstract_declarator
 | 
|---|
 | 124 | int ad() {
 | 
|---|
 | 125 |     typeof( int __attribute__(( used )) ) ad1 __attribute__(( unused ));
 | 
|---|
 | 126 |     typeof( int __attribute__(( unused )) * __attribute__(( unused )) ) ad2 __attribute__(( unused ));
 | 
|---|
 | 127 |     typeof( int __attribute__(( unused )) [5] ) __attribute__(( unused )) ad3 __attribute__(( unused ));
 | 
|---|
 | 128 |     typeof( __attribute__(( unused )) int __attribute__(( unused )) (*)[10] __attribute__(( unused )) ) __attribute__(( unused )) ad4 __attribute__(( unused )), ad5 __attribute__(( used ));
 | 
|---|
 | 129 |     typeof( __attribute__(( unused )) int __attribute__(( unused )) () __attribute__(( unused )) ) __attribute__(( unused )) ad6 __attribute__(( unused ));
 | 
|---|
 | 130 |     sizeof( __attribute__(( unused )) int __attribute__(( unused )) );
 | 
|---|
 | 131 |     sizeof( __attribute__(( unused )) int __attribute__(( unused )) (* __attribute__(( unused )) (* __attribute__(( unused )) ) ) );
 | 
|---|
 | 132 |     sizeof( __attribute__(( unused )) int __attribute__(( unused )) [5] __attribute__(( unused )) );
 | 
|---|
 | 133 |     sizeof( __attribute__(( unused )) int __attribute__(( unused )) (*)[10] __attribute__(( unused )) );
 | 
|---|
 | 134 |     sizeof( __attribute__(( unused )) int __attribute__(( unused )) () __attribute__(( unused )) );
 | 
|---|
 | 135 |     sizeof( struct { int i; } __attribute__(( unused )) );
 | 
|---|
 | 136 |     sizeof( enum { R } __attribute__(( unused )) );
 | 
|---|
 | 137 | }
 | 
|---|
 | 138 | 
 | 
|---|
 | 139 | 
 | 
|---|
 | 140 | // abstract_parameter_declarator
 | 
|---|
 | 141 | int apd1( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )),
 | 
|---|
 | 142 |         __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) );
 | 
|---|
 | 143 | int apd2( __attribute__(( unused )) int __attribute__(( unused )) (* (* __attribute__(( unused )) ) __attribute__(( unused )) ),
 | 
|---|
 | 144 |         __attribute__(( unused )) int __attribute__(( unused )) (* (* __attribute__(( unused )) ) __attribute__(( unused )) ) );
 | 
|---|
 | 145 | int apd3( __attribute__(( unused )) int __attribute__(( unused )) ([]) __attribute__(( unused )),
 | 
|---|
 | 146 |         __attribute__(( unused )) int __attribute__(( unused )) ([]) __attribute__(( unused )) );
 | 
|---|
 | 147 | int apd4( __attribute__(( unused )) int __attribute__(( unused )) ()  __attribute__(( unused )),
 | 
|---|
 | 148 |         __attribute__(( unused )) int __attribute__(( unused )) ()  __attribute__(( unused )) );
 | 
|---|
 | 149 | int apd5( __attribute__(( unused )) int __attribute__(( unused )) (( __attribute__(( unused )) int )) __attribute__(( unused )),
 | 
|---|
 | 150 |         __attribute__(( unused )) int __attribute__(( unused )) ( __attribute__(( unused )) int ) __attribute__(( unused )) );
 | 
|---|
 | 151 | int apd6( __attribute__(( unused )) int __attribute__(( unused )) (*)()  __attribute__(( unused )),
 | 
|---|
 | 152 |         __attribute__(( unused )) int __attribute__(( unused )) (*)()  __attribute__(( unused )) );
 | 
|---|
 | 153 | int apd7( __attribute__(( unused )) int __attribute__(( unused )) ((*)( __attribute__(( unused )) int ) ) __attribute__(( unused )),
 | 
|---|
 | 154 |         __attribute__(( unused )) int __attribute__(( unused )) ((*)( __attribute__(( unused )) int ) ) __attribute__(( unused )) );
 | 
|---|
 | 155 | 
 | 
|---|
 | 156 | 
 | 
|---|
 | 157 | // variable_abstract_declarator
 | 
|---|
 | 158 | struct Vad {
 | 
|---|
 | 159 |     int __attribute__(( unused ));
 | 
|---|
| [e07caa2] | 160 |     int __attribute__(( unused )) :4;
 | 
|---|
 | 161 |     int __attribute__(( unused )) :4, __attribute__(( unused )) :6;
 | 
|---|
| [c0aa336] | 162 | };
 | 
|---|
 | 163 | 
 | 
|---|
 | 164 | // Local Variables: //
 | 
|---|
 | 165 | // tab-width: 4 //
 | 
|---|
| [dc8511c] | 166 | // compile-command: "cfa attributes.cfa" //
 | 
|---|
| [c0aa336] | 167 | // End: //
 | 
|---|