[5ead9f9] | 1 | //
|
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2016 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 | // variableDeclarator.cfa --
|
---|
[5ead9f9] | 8 | //
|
---|
| 9 | // Author : Peter A. Buhr
|
---|
| 10 | // Created On : Wed Aug 17 08:41:42 2016
|
---|
| 11 | // Last Modified By : Peter A. Buhr
|
---|
[53692b3] | 12 | // Last Modified On : Sat Jun 5 10:08:47 2021
|
---|
| 13 | // Update Count : 14
|
---|
[5ead9f9] | 14 | //
|
---|
| 15 |
|
---|
| 16 | // Variable declarations test
|
---|
[62edde5] | 17 | int f1;
|
---|
| 18 | int (f2);
|
---|
| 19 |
|
---|
[66812dd] | 20 | int * f3;
|
---|
| 21 | int ** f4;
|
---|
| 22 | int * const * f5;
|
---|
[62edde5] | 23 | int * const * const f6;
|
---|
| 24 |
|
---|
[66812dd] | 25 | int * (f7);
|
---|
| 26 | int ** (f8);
|
---|
| 27 | int * const * (f9);
|
---|
[62edde5] | 28 | int * const * const (f10);
|
---|
| 29 |
|
---|
[66812dd] | 30 | int (* f11);
|
---|
| 31 | int (** f12);
|
---|
| 32 | int (* const * f13);
|
---|
[62edde5] | 33 | int (* const * const f14);
|
---|
| 34 |
|
---|
[66812dd] | 35 | int f15[0];
|
---|
[62edde5] | 36 | int f16[10];
|
---|
[66812dd] | 37 | int (f17[0]);
|
---|
[62edde5] | 38 | int (f18[10]);
|
---|
| 39 |
|
---|
[66812dd] | 40 | int * f19[0];
|
---|
| 41 | int * f20[10];
|
---|
| 42 | int ** f21[0];
|
---|
| 43 | int ** f22[10];
|
---|
| 44 | int * const * f23[0];
|
---|
| 45 | int * const * f24[10];
|
---|
| 46 | int * const * const f25[0];
|
---|
[62edde5] | 47 | int * const * const f26[10];
|
---|
| 48 |
|
---|
[66812dd] | 49 | int *(f27[0]);
|
---|
[62edde5] | 50 | int *(f28[10]);
|
---|
[66812dd] | 51 | int **(f29[0]);
|
---|
[62edde5] | 52 | int **(f30[10]);
|
---|
[66812dd] | 53 | int * const *(f31[0]);
|
---|
[62edde5] | 54 | int * const *(f32[10]);
|
---|
[66812dd] | 55 | int * const * const (f33[0]);
|
---|
[62edde5] | 56 | int * const * const (f34[10]);
|
---|
| 57 |
|
---|
[66812dd] | 58 | int (* f35)[];
|
---|
| 59 | int (* f36)[10];
|
---|
| 60 | int (** f37)[];
|
---|
| 61 | int (** f38)[10];
|
---|
| 62 | int (* const * f39)[];
|
---|
| 63 | int (* const * f40)[10];
|
---|
[62edde5] | 64 | int (* const * const f41)[];
|
---|
| 65 | int (* const * const f42)[10];
|
---|
| 66 |
|
---|
[66812dd] | 67 | int f43[0][3];
|
---|
[62edde5] | 68 | int f44[3][3];
|
---|
[66812dd] | 69 | int (f45[0])[3];
|
---|
[62edde5] | 70 | int (f46[3])[3];
|
---|
[66812dd] | 71 | int ((f47[0]))[3];
|
---|
[62edde5] | 72 | int ((f48[3]))[3];
|
---|
| 73 |
|
---|
[66812dd] | 74 | int * f49[0][3];
|
---|
| 75 | int * f50[3][3];
|
---|
| 76 | int ** f51[0][3];
|
---|
| 77 | int ** f52[3][3];
|
---|
| 78 | int * const * f53[0][3];
|
---|
| 79 | int * const * f54[3][3];
|
---|
| 80 | int * const * const f55[0][3];
|
---|
[62edde5] | 81 | int * const * const f56[3][3];
|
---|
| 82 |
|
---|
[66812dd] | 83 | int (* f57[0][3]);
|
---|
| 84 | int (* f58[3][3]);
|
---|
| 85 | int (** f59[0][3]);
|
---|
| 86 | int (** f60[3][3]);
|
---|
| 87 | int (* const * f61[0][3]);
|
---|
| 88 | int (* const * f62[3][3]);
|
---|
| 89 | int (* const * const f63[0][3]);
|
---|
[62edde5] | 90 | int (* const * const f64[3][3]);
|
---|
| 91 |
|
---|
| 92 | int f65(int);
|
---|
| 93 | int (f66)(int);
|
---|
| 94 |
|
---|
[2853d6f] | 95 | #pragma GCC diagnostic push
|
---|
| 96 | #pragma GCC diagnostic ignored "-Wignored-qualifiers"
|
---|
| 97 |
|
---|
[66812dd] | 98 | int * f67(int);
|
---|
| 99 | int ** f68(int);
|
---|
| 100 | int * const * f69(int);
|
---|
[62edde5] | 101 | int * const * const f70(int);
|
---|
| 102 |
|
---|
| 103 | int *(f71)(int);
|
---|
| 104 | int **(f72)(int);
|
---|
| 105 | int * const *(f73)(int);
|
---|
| 106 |
|
---|
| 107 | int * const * const (f74)(int);
|
---|
| 108 |
|
---|
[66812dd] | 109 | int (* f75)(int);
|
---|
| 110 | int (** f76)(int);
|
---|
| 111 | int (* const * f77)(int);
|
---|
[62edde5] | 112 | int (* const * const f78)(int);
|
---|
| 113 |
|
---|
[66812dd] | 114 | int (*(* f79)(int))();
|
---|
[62edde5] | 115 | int (*(* const f80)(int))();
|
---|
| 116 | int (* const(* const f81)(int))();
|
---|
| 117 |
|
---|
[2853d6f] | 118 | #pragma GCC diagnostic pop
|
---|
| 119 |
|
---|
[62edde5] | 120 | // errors
|
---|
| 121 |
|
---|
| 122 | //int fe0[](); // array of functions
|
---|
| 123 | //int (fe1[])(); // array of functions
|
---|
| 124 | //int fe2()[]; // returning an array
|
---|
| 125 | //int fe3()(); // returning a function
|
---|
[66812dd] | 126 | //int (* fe4)()(); // returning a function
|
---|
| 127 | //int ((* fe5())())[]; // returning an array
|
---|
[62edde5] | 128 |
|
---|
[66812dd] | 129 | #ifdef __CFA__
|
---|
[62edde5] | 130 | // Cforall extensions
|
---|
| 131 |
|
---|
| 132 | * int cf3;
|
---|
| 133 | * * int cf4;
|
---|
| 134 | * const * int cf5;
|
---|
| 135 | const * const * int cf6;
|
---|
| 136 |
|
---|
[66812dd] | 137 | [0] int cf15;
|
---|
[62edde5] | 138 | [10] int cf16;
|
---|
| 139 |
|
---|
[66812dd] | 140 | [0] * int cf19;
|
---|
[62edde5] | 141 | [10] * int cf20;
|
---|
[66812dd] | 142 | int ** cf21[0];
|
---|
[62edde5] | 143 | [10] * * int cf22;
|
---|
[66812dd] | 144 | [0] * const * int cf23;
|
---|
[62edde5] | 145 | [10] * const * int cf24;
|
---|
[66812dd] | 146 | [0] const * const * int cf25;
|
---|
[62edde5] | 147 | [10] const * const * int cf26;
|
---|
| 148 |
|
---|
| 149 | * [] int cf35;
|
---|
| 150 | * [10] int cf36;
|
---|
| 151 | * * [] int cf37;
|
---|
| 152 | * * [10] int cf38;
|
---|
| 153 | * const * [] int cf39;
|
---|
| 154 | * const * [10] int cf40;
|
---|
| 155 | const * const * [] int cf41;
|
---|
| 156 | const * const * [10] int cf42;
|
---|
| 157 |
|
---|
[66812dd] | 158 | [0][3] int cf43;
|
---|
[62edde5] | 159 | [3][3] int cf44;
|
---|
| 160 |
|
---|
[66812dd] | 161 | [0][3] * int cf49;
|
---|
[62edde5] | 162 | [3][3] * int cf50;
|
---|
[66812dd] | 163 | [0][3] * * int cf51;
|
---|
[62edde5] | 164 | [3][3] * * int cf52;
|
---|
[66812dd] | 165 | [0][3] const * int cf53;
|
---|
[62edde5] | 166 | [3][3] * const * int cf54;
|
---|
[66812dd] | 167 | [0][3] const * const * int cf55;
|
---|
[62edde5] | 168 | [3][3] const * const * int cf56;
|
---|
| 169 |
|
---|
| 170 | [int] cf65(int);
|
---|
| 171 | [int] cf66(int);
|
---|
| 172 |
|
---|
[2853d6f] | 173 | #pragma GCC diagnostic push
|
---|
| 174 | #pragma GCC diagnostic ignored "-Wignored-qualifiers"
|
---|
| 175 |
|
---|
[62edde5] | 176 | [* int] cf67(int);
|
---|
| 177 | [* * int] cf68(int);
|
---|
| 178 | [const * * int] cf69(int);
|
---|
| 179 | [const * const * int] cf70(int);
|
---|
| 180 |
|
---|
[2853d6f] | 181 | #pragma GCC diagnostic pop
|
---|
| 182 |
|
---|
[62edde5] | 183 | // function pointer
|
---|
| 184 |
|
---|
| 185 | *[]*[]* [ *[]*[] int ]( *[]*[] int, *[]*[] int ) v3;
|
---|
[66812dd] | 186 | #endif // __CFA__
|
---|
[62edde5] | 187 |
|
---|
| 188 | //Dummy main
|
---|
[2853d6f] | 189 | int main() {
|
---|
| 190 | printf("done\n");
|
---|
[62edde5] | 191 | }
|
---|
[5ead9f9] | 192 |
|
---|
| 193 | // Local Variables: //
|
---|
| 194 | // tab-width: 4 //
|
---|
[dc8511c] | 195 | // compile-command: "cfa variableDeclarator.cfa" //
|
---|
[5ead9f9] | 196 | // End: //
|
---|