Changeset 2853d6f
- Timestamp:
- Jan 2, 2025, 7:00:01 PM (3 months ago)
- Branches:
- master
- Children:
- 656c8ac
- Parents:
- a6b48f6
- Location:
- tests
- Files:
-
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tests/.expect/array-ERR1.txt ¶
ra6b48f6 r2853d6f 1 array.cfa:125:25: warning: Preprocessor started 2 array.cfa:40:22: error: '[*]' not allowed in other than function prototype scope 1 array.cfa:40:23: error: '[*]' not allowed in other than function prototype scope 3 2 array.cfa:46:24: error: '[*]' not allowed in other than function prototype scope 4 array.cfa: In function '_X4fredF i_i__1':3 array.cfa: In function '_X4fredFv_i__1': 5 4 array.cfa:52:16: error: array size missing in '_X2a1A0i_2' 6 5 array.cfa:53:26: error: '[*]' not allowed in other than function prototype scope 7 6 array.cfa: At top level: 8 array.cfa: 64:1: error: '[*]' not allowed in other than function prototype scope7 array.cfa:75:1: error: '[*]' not allowed in other than function prototype scope -
TabularUnified tests/.expect/array-ERR2.txt ¶
ra6b48f6 r2853d6f 1 array.cfa:125:25: warning: Preprocessor started 2 array.cfa:117:32: error: syntax error, unexpected STATIC before token "static" 1 array.cfa:139:33: error: syntax error, unexpected STATIC before token "static" -
TabularUnified tests/.expect/array-ERR3.txt ¶
ra6b48f6 r2853d6f 1 array.cfa:125:25: warning: Preprocessor started 2 array.cfa:118:32: error: syntax error, unexpected ']' before token "]" 1 array.cfa:140:33: error: syntax error, unexpected ']' before token "]" -
TabularUnified tests/.expect/array.txt ¶
ra6b48f6 r2853d6f 1 array.cfa:125:25: warning: Preprocessor started 1 done -
TabularUnified tests/.expect/attr-priority.txt ¶
ra6b48f6 r2853d6f 1 1 attr-priority.cfa:7:1 warning: invalid attribute: constructor priorities from 101 to 200 are reserved for the implementation. 2 2 attr-priority.cfa:12:1 warning: invalid attribute: destructor priorities from 101 to 200 are reserved for the implementation. 3 attr-priority.cfa:8:1 error: Invalid application of existing declaration(s) in expression Applying untyped:4 Name: malloc5 ...to:6 -
TabularUnified tests/.expect/cast.txt ¶
ra6b48f6 r2853d6f 1 cast.cfa:16:25: warning: Compiled 1 done -
TabularUnified tests/.expect/expression.txt ¶
ra6b48f6 r2853d6f 1 expression.cfa:86:25: warning: Compiled 1 done -
TabularUnified tests/.expect/identFuncDeclarator.txt ¶
ra6b48f6 r2853d6f 1 identFuncDeclarator.cfa:114:25: warning: Compiled 1 done -
TabularUnified tests/.expect/init1-ERROR.txt ¶
ra6b48f6 r2853d6f 1 init1.cfa:134:25: warning: Compiled2 1 init1.cfa:56:1 error: Invalid application of existing declaration(s) in expression Untyped Init Expression 3 2 Name: rx InitAlternative: reference to signed int -
TabularUnified tests/.expect/init1.txt ¶
ra6b48f6 r2853d6f 1 init1.cfa:134:25: warning: Compiled 1 done -
TabularUnified tests/.expect/limits.txt ¶
ra6b48f6 r2853d6f 1 limits.cfa:152:25: warning: Compiled 1 done -
TabularUnified tests/.expect/nested-types-ERR1.txt ¶
ra6b48f6 r2853d6f 1 nested-types.cfa:100:25: warning: Compiled 2 nested-types.cfa:83:1 error: Use of undefined type T. 1 nested-types.cfa:85:1 error: Use of undefined type T. -
TabularUnified tests/.expect/nested-types-ERR2.txt ¶
ra6b48f6 r2853d6f 1 nested-types.cfa:100:25: warning: Compiled 2 nested-types.cfa:86:1 error: Use of undefined global type Z. 3 nested-types.cfa:87:1 error: Qualified type requires an aggregate on the left, but has signed int. 4 nested-types.cfa:88:1 error: Undefined type in qualified type Qualified Type: 1 nested-types.cfa:88:1 error: Use of undefined global type Z. 2 nested-types.cfa:89:1 error: Qualified type requires an aggregate on the left, but has signed int. 3 nested-types.cfa:90:1 error: Undefined type in qualified type Qualified Type: 5 4 instance of struct S with body 6 5 instance of type Z (not function type) -
TabularUnified tests/.expect/nested-types.txt ¶
ra6b48f6 r2853d6f 1 nested-types.cfa:100:25: warning: Compiled 1 done -
TabularUnified tests/.expect/numericConstants.txt ¶
ra6b48f6 r2853d6f 1 numericConstants.cfa:66:25: warning: Compiled 1 done -
TabularUnified tests/.expect/quasiKeyword.txt ¶
ra6b48f6 r2853d6f 1 quasiKeyword.cfa:52:25: warning: Compiled 1 done -
TabularUnified tests/.expect/switch.txt ¶
ra6b48f6 r2853d6f 1 switch.cfa:103:25: warning: Compiled 1 done -
TabularUnified tests/.expect/typedefRedef-ERR1.txt ¶
ra6b48f6 r2853d6f 1 typedefRedef.cfa:87:25: warning: Compiled2 1 typedefRedef.cfa:4:1 error: Cannot redefine typedef Foo 3 2 typedefRedef.cfa:31:1 error: Cannot redefine typedef ARR -
TabularUnified tests/.expect/typedefRedef.txt ¶
ra6b48f6 r2853d6f 1 typedefRedef.cfa:87:25: warning: Compiled 1 done -
TabularUnified tests/.expect/variableDeclarator.txt ¶
ra6b48f6 r2853d6f 1 variableDeclarator.cfa:180:25: warning: Compiled 1 done -
TabularUnified tests/Makefile.am ¶
ra6b48f6 r2853d6f 39 39 -Wall \ 40 40 -Wextra \ 41 -Werror 41 -Werror -Wno-unused-variable -Wno-unused-parameter 42 42 43 43 WFLAGS_LAX = \ … … 51 51 # Making this association implicit would be ideal, but requires learning more automake than is affordable. 52 52 WFLGAS_OPT_LAX = \ 53 ${WFLGAS_OPT_LAX_EXPECT_WARN} \ 54 ${WFLGAS_OPT_LAX_TO_INVESTIGATE} 55 56 # Tests checking that cfa-cc raises a certain warning, so -Werror is permanently inappropriate 57 WFLGAS_OPT_LAX_EXPECT_WARN = \ 58 attr-priority \ 59 warnings/self-assignment 60 61 # Tests that need investigation from the CFA team about why they require lax wflags. Goal is to eliminate this list. 62 WFLGAS_OPT_LAX_TO_INVESTIGATE = \ 53 63 alloc \ 54 array \55 64 array-collections/boxed \ 56 65 array-collections/boxed% \ 57 66 array-collections/dimexpr-match-c \ 58 67 array-collections/dimexpr-match-cfa \ 59 array-ERR1 \60 array-ERR2 \61 array-ERR3 \62 68 attributes \ 63 attr-priority \64 builtins/sync \65 cast \66 69 collections/atomic_mpsc \ 67 70 collections/multi_list \ … … 136 139 concurrency/unified_locking/timeout_lock \ 137 140 concurrency/waitfor/barge \ 138 concurrency/waitfor/parse \139 141 concurrency/waitfor/statment \ 140 142 concurrency/waitfor/when \ … … 171 173 exceptions/try-leave-catch \ 172 174 exceptions/virtual-poly \ 173 expression \174 175 forall \ 175 176 function-operator \ 176 177 gmp \ 177 identFuncDeclarator \178 178 identParamDeclarator \ 179 179 include/includes \ … … 182 182 include/vector-fstream \ 183 183 include/vector-sequence \ 184 init1 \185 init1-ERROR \186 184 io/away_fair \ 187 185 io/comp_basic \ … … 195 193 io/manipulatorsInput-uchunk \ 196 194 io/many_read \ 197 limits \198 195 linking/io-acquire \ 199 196 linking/mangling/anon \ … … 207 204 maybe \ 208 205 minmax \ 209 nested-types \210 nested-types-ERR1 \211 nested-types-ERR2 \212 numericConstants \213 206 operators \ 214 207 poly-d-cycle \ … … 218 211 poly-o-cycle \ 219 212 PRNG \ 220 quasiKeyword \221 213 quotedKeyword \ 222 214 raii/boxed-types \ … … 237 229 tuple/tuplePolymorphism \ 238 230 tuple/tupleVariadic \ 239 typedefRedef \240 typedefRedef-ERR1 \241 231 typeof \ 242 232 userLiterals \ 243 variableDeclarator \ 244 vector \ 245 warnings/self-assignment 233 vector 246 234 247 235 WFLAGS=${if ${filter ${WFLGAS_OPT_LAX},${@}},${WFLAGS_LAX},${WFLAGS_STRICT}} … … 413 401 CFACOMPILE_SYNTAX = ${CFACOMPILETEST} -Wno-unused-variable -Wno-unused-label -c -fsyntax-only -o ${abspath ${@}} 414 402 415 SYNTAX_ONLY_CODE = \ 416 array cast expression identFuncDeclarator init1 limits nested-types numericConstants opt-params quasiKeyword switch typedefRedef variableDeclarator \ 417 builtins/sync concurrency/waitfor/parse ctrl-flow/labelledExit include/stdincludes include/includes warnings/self-assignment 403 SYNTAX_ONLY_CODE = attr-priority warnings/self-assignment 418 404 419 405 ${SYNTAX_ONLY_CODE} : % : %.cfa ${CFACCBIN} -
TabularUnified tests/array.cfa ¶
ra6b48f6 r2853d6f 37 37 #endif 38 38 39 int a1[0];40 E1( int a2[*]; )39 int ga1[0]; 40 E1( int ga2[*]; ) 41 41 #ifndef __cforall 42 E1( double a4[3.0]; ) // BUG 275: CFA accepts but should reject42 E1( int ga3[3.0]; ) // BUG 275: CFA accepts but should reject 43 43 #endif 44 44 … … 49 49 typedef int T; 50 50 51 intfred(int n) {52 E1( int a1[]; 53 E1( int a2[*]; 54 int a4[3]; 55 int T[3]; 56 int a5[n]; 51 void fred(int n) { 52 E1( int a1[]; ) 53 E1( int a2[*]; ) 54 int a4[3]; (void) a4; 55 int T[3]; (void) T; 56 int a5[n]; (void) a5; 57 57 } 58 58 59 intfred2(int n,59 void fred2(int n, 60 60 int a1[], 61 E1( int a2[*], )61 E1( int a2[*], ) 62 62 int a4[3], 63 int T[3] ,63 int T[3] __attribute__((unused)), 64 64 int a5[n] 65 ) {} 65 ) { 66 // FIX ME: Replace attribute-unused on T with void cast, once Trac 297 is fixed. 67 // This parameter should be in scope and usable within the body. 66 68 67 int mary( int T[3], // same as: int *T 68 int p1[const 3], // same as: int const *p1 69 int p2[static 3], // same as T, but length >=3 checked 70 int p3[static const 3] // both above: 3 is static, p3 is const 71 ) { 69 // Skip a2 because it's declared only in an error case. 70 71 (void) a1; 72 (void) a4; 73 // (void) T; 74 (void) a5; 75 } 76 77 void mary( 78 int T[3] __attribute__((unused)), // same as: int *T 79 int p1[const 3], // same as: int const *p1 80 int p2[static 3], // same as T, but length >=3 checked 81 int p3[static const 3] // both above: 3 is static, p3 is const 82 ) { 83 // FIX ME: Replace attribute-unused on T with void cast, once Trac 297 is fixed. 84 // This parameter should be in scope and usable within the body. 85 86 // (void) T; 87 (void) p1; 88 (void) p2; 89 (void) p3; 72 90 } 73 91 74 92 // function taking (), returning pointer to array of ints 75 93 int (*tom())[3] { 94 return 0p; 76 95 } 77 96 … … 82 101 int p3[static const 3] 83 102 ) { 103 return 0p; 84 104 } 85 105 … … 87 107 #ifdef __cforall 88 108 [ * [3] int ] toms_twin(...) { 109 return 0p; 89 110 } 90 111 [ * [int]( [3] int T, … … 94 115 ) 95 116 ] janes_twin(...) { 117 return 0p; 96 118 } 97 119 #endif … … 112 134 // fm5. 113 135 114 intfm1x( int, int, int[][*] );115 int fm1y( int r, int c, int m[][c] ) {}116 int fm2( int r, int c, int (*m)[c] ) {} // same as fm1117 E2( intfm3( int r, int c, int m[][static c] ) {} ) // that's not static118 E3( intfm4( int r, int c, int m[][] ); ) // m's immediate element type is incomplete119 int fm5x( int, int, int[*][*] ); // same asfm1 decl120 int fm5y( int r, int c, int m[r][c] ) {} // same asfm1 defn136 void fm1x( int, int, int[][*] ); 137 void fm1y( int r, int c, int m[][c] ) { (void) r; (void) c; (void) m; } 138 void fm2( int r, int c, int (*m)[c] ) { (void) r; (void) c; (void) m; } // same as fm1 139 E2( void fm3( int r, int c, int m[][static c] ) {} ) // that's not static 140 E3( void fm4( int r, int c, int m[][] ); ) // m's immediate element type is incomplete 141 void fm5x( int, int, int[*][*] ); // alt syntax for fm1 decl 142 void fm5y( int r, int c, int m[r][c] ) { (void) r; (void) c; (void) m; } // alt syntax for fm1 defn 121 143 122 144 123 145 124 146 int main() { 125 #pragma GCC warning "Preprocessor started" // force non-empty .expect file, NO TABS!!!147 printf("done\n"); 126 148 } 127 149 -
TabularUnified tests/attr-priority.cfa ¶
ra6b48f6 r2853d6f 1 // Although we are testing the attribute priority checks, we also have a2 // resolver error to force the expect to compare against the compiler output. 1 // Is compiled -fsyntax-only, to make the test's "output" be the warnings from cfa-cpp. 2 3 3 4 4 int * store = 0p; … … 6 6 __attribute__(( constructor(150) )) 7 7 void ctor_store(void) { 8 store = malloc();8 store = (int*)malloc(200); 9 9 } 10 10 … … 14 14 store = 0; 15 15 } 16 17 int main(void) {18 return 0;19 } -
TabularUnified tests/builtins/.expect/sync.txt ¶
ra6b48f6 r2853d6f 1 builtins/sync.cfa:356:25: warning: Compiled 1 done -
TabularUnified tests/builtins/sync.cfa ¶
ra6b48f6 r2853d6f 354 354 355 355 int main() { 356 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 356 printf("done\n"); 357 357 } -
TabularUnified tests/cast.cfa ¶
ra6b48f6 r2853d6f 4 4 void f() { 5 5 char f; 6 double f ;6 double f __attribute__((unused)); 7 7 (int)f; 8 8 short f; … … 13 13 14 14 //Dummy main 15 int main( int argc, char const * argv[]) {16 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!!15 int main() { 16 printf("done\n"); 17 17 } -
TabularUnified tests/concurrency/waitfor/.expect/parse.txt ¶
ra6b48f6 r2853d6f 1 concurrency/waitfor/parse.cfa:255:25: warning: Compiled 1 done -
TabularUnified tests/concurrency/waitfor/parse.cfa ¶
ra6b48f6 r2853d6f 252 252 253 253 //Dummy main 254 int main( int argc, char const * argv[]) {255 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 254 int main() { 255 printf("done\n"); 256 256 } 257 257 -
TabularUnified tests/ctrl-flow/.expect/labelledExit.txt ¶
ra6b48f6 r2853d6f 1 ctrl-flow/labelledExit.cfa:181:25: warning: Compiled 1 done -
TabularUnified tests/ctrl-flow/labelledExit.cfa ¶
ra6b48f6 r2853d6f 179 179 180 180 int main( int argc, char const *argv[] ) { 181 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 181 printf("done\n"); 182 182 } 183 183 -
TabularUnified tests/expression.cfa ¶
ra6b48f6 r2853d6f 1 1 struct S { int i; }; 2 2 void ?{}( S & s, int i ) { s.i = i; } 3 int ?`mary( int ) ;4 int ?`mary( S ) ;5 [int] ?`mary( [int, int] ) ;6 int & ?`jane( int & );7 int jack( int ) ;3 int ?`mary( int ) { return 0; } 4 int ?`mary( S ) { return 0; } 5 [int] ?`mary( [int, int] ) { return 0; } 6 int & ?`jane( int & x ) { return x; } 7 int jack( int ) { return 0; } 8 8 9 9 int main() { … … 84 84 (S)@{2}`mary; 85 85 86 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 86 printf("done\n"); 87 87 } // main -
TabularUnified tests/identFuncDeclarator.cfa ¶
ra6b48f6 r2853d6f 14 14 // 15 15 16 int f1; 17 int (f2); 18 19 int * f3; 20 int ** f4; 21 int * const * f5; 22 int * const * const f6; 23 24 int * (f7); 25 int ** (f8); 26 int * const * (f9); 27 int * const * const (f10); 28 29 int (* f11); 30 int (** f12); 31 int (* const * f13); 32 int (* const * const f14); 33 34 int f15[2]; 35 int f16[10]; 36 int (f17[2]); 37 int (f18[10]); 38 39 int * f19[2]; 40 int * f20[10]; 41 int ** f21[2]; 42 int ** f22[10]; 43 int * const * f23[2]; 44 int * const * f24[10]; 45 int * const * const f25[2]; 46 int * const * const f26[10]; 47 48 int * (f27[2]); 49 int * (f28[10]); 50 int ** (f29[2]); 51 int ** (f30[10]); 52 int * const * (f31[2]); 53 int * const * (f32[10]); 54 int * const * const (f33[2]); 55 int * const * const (f34[10]); 56 57 int (* f35[2]); 58 int (* f36[10]); 59 int (** f37[2]); 60 int (** f38[10]); 61 int (* const * f39[2]); 62 int (* const * f40[10]); 63 int (* const * const f41[2]); 64 int (* const * const f42[10]); 65 66 int f43[2][3]; 67 int f44[3][3]; 68 int (f45[2])[3]; 69 int (f46[3])[3]; 70 int ((f47[2]))[3]; 71 int ((f48[3]))[3]; 72 73 int * f49[2][3]; 74 int * f50[3][3]; 75 int ** f51[2][3]; 76 int ** f52[3][3]; 77 int * const * f53[2][3]; 78 int * const * f54[3][3]; 79 int * const * const f55[2][3]; 80 int * const * const f56[3][3]; 81 82 int (* f57[2][3]); 83 int (* f58[3][3]); 84 int (** f59[2][3]); 85 int (** f60[3][3]); 86 int (* const * f61[2][3]); 87 int (* const * f62[3][3]); 88 int (* const * const f63[2][3]); 89 int (* const * const f64[3][3]); 90 91 int f65(int); 92 int (f66)(int); 93 94 #pragma GCC diagnostic push 95 #pragma GCC diagnostic ignored "-Wignored-qualifiers" 96 97 int * f67(int); 98 int ** f68(int); 99 int * const * f69(int); 100 int * const * const f70(int); 101 102 int * (f71)(int); 103 int ** (f72)(int); 104 int * const * (f73)(int); 105 int * const * const (f74)(int); 106 107 int (* f75)(int); 108 int (** f76)(int); 109 int (* const * f77)(int); 110 int (* const * const f78)(int); 111 112 int (* (* f79)(int))(); 113 int (* (* const f80)(int))(); 114 int (* const(* const f81)(int))(); 115 116 #pragma GCC diagnostic pop 117 16 118 int main() { 17 int f1; 18 int (f2); 19 20 int * f3; 21 int ** f4; 22 int * const * f5; 23 int * const * const f6; 24 25 int * (f7); 26 int ** (f8); 27 int * const * (f9); 28 int * const * const (f10); 29 30 int (* f11); 31 int (** f12); 32 int (* const * f13); 33 int (* const * const f14); 34 35 int f15[2]; 36 int f16[10]; 37 int (f17[2]); 38 int (f18[10]); 39 40 int * f19[2]; 41 int * f20[10]; 42 int ** f21[2]; 43 int ** f22[10]; 44 int * const * f23[2]; 45 int * const * f24[10]; 46 int * const * const f25[2]; 47 int * const * const f26[10]; 48 49 int * (f27[2]); 50 int * (f28[10]); 51 int ** (f29[2]); 52 int ** (f30[10]); 53 int * const * (f31[2]); 54 int * const * (f32[10]); 55 int * const * const (f33[2]); 56 int * const * const (f34[10]); 57 58 int (* f35[2]); 59 int (* f36[10]); 60 int (** f37[2]); 61 int (** f38[10]); 62 int (* const * f39[2]); 63 int (* const * f40[10]); 64 int (* const * const f41[2]); 65 int (* const * const f42[10]); 66 67 int f43[2][3]; 68 int f44[3][3]; 69 int (f45[2])[3]; 70 int (f46[3])[3]; 71 int ((f47[2]))[3]; 72 int ((f48[3]))[3]; 73 74 int * f49[2][3]; 75 int * f50[3][3]; 76 int ** f51[2][3]; 77 int ** f52[3][3]; 78 int * const * f53[2][3]; 79 int * const * f54[3][3]; 80 int * const * const f55[2][3]; 81 int * const * const f56[3][3]; 82 83 int (* f57[2][3]); 84 int (* f58[3][3]); 85 int (** f59[2][3]); 86 int (** f60[3][3]); 87 int (* const * f61[2][3]); 88 int (* const * f62[3][3]); 89 int (* const * const f63[2][3]); 90 int (* const * const f64[3][3]); 91 92 int f65(int); 93 int (f66)(int); 94 95 int * f67(int); 96 int ** f68(int); 97 int * const * f69(int); 98 int * const * const f70(int); 99 100 int * (f71)(int); 101 int ** (f72)(int); 102 int * const * (f73)(int); 103 int * const * const (f74)(int); 104 105 int (* f75)(int); 106 int (** f76)(int); 107 int (* const * f77)(int); 108 int (* const * const f78)(int); 109 110 int (* (* f79)(int))(); 111 int (* (* const f80)(int))(); 112 int (* const(* const f81)(int))(); 113 114 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 119 printf("done\n"); 115 120 } 116 121 -
TabularUnified tests/include/.expect/includes.txt ¶
ra6b48f6 r2853d6f 1 include/includes.cfa:173:25: warning: Compiled 1 done -
TabularUnified tests/include/.expect/stdincludes.txt ¶
ra6b48f6 r2853d6f 1 include/stdincludes.cfa:50:25: warning: Compiled 1 done -
TabularUnified tests/include/includes.cfa ¶
ra6b48f6 r2853d6f 171 171 172 172 int main() { 173 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!!173 printf("done\n"); 174 174 } 175 175 -
TabularUnified tests/include/stdincludes.cfa ¶
ra6b48f6 r2853d6f 48 48 49 49 int main() { 50 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!!50 printf("done\n"); 51 51 } 52 52 -
TabularUnified tests/init1.cfa ¶
ra6b48f6 r2853d6f 32 32 // 33 33 34 char * str1 = "hi"; 35 const char * str2 = "hi"; 34 char * str1 = "hi"; (void) str1; 35 const char * str2 = "hi"; (void) str2; 36 36 37 float & rx2 = rx; 38 float * px2 = px; 37 float & rx2 = rx; (void) rx2; 38 float * px2 = px; (void) px2; 39 39 40 const float & crx2 = crx; 41 const float * cpx2 = cpx; 40 const float & crx2 = crx; (void) crx2; 41 const float * cpx2 = cpx; (void) cpx2; 42 42 43 43 // FIX ME: Code gen not producing correct cast. … … 132 132 133 133 int main() { 134 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!!134 printf("done\n"); 135 135 } -
TabularUnified tests/limits.cfa ¶
ra6b48f6 r2853d6f 149 149 long double _Complex _1_sqrt_2 = _1_SQRT_2; 150 150 151 int main( int argc, char const *argv[]) {152 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 151 int main() { 152 printf("done\n"); 153 153 } 154 154 -
TabularUnified tests/nested-types.cfa ¶
ra6b48f6 r2853d6f 64 64 // S.T t; 65 65 66 #pragma GCC diagnostic ignored "-Wunused-variable" 67 66 68 int main() { 67 69 // access nested struct … … 93 95 94 96 S.Bar y; 95 S.Baz x;97 S.Baz w; 96 98 S.T.Bar z; 97 99 98 100 // A.N(int) x; // xxx - should not be an error, but currently is. 99 101 100 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 102 printf("done\n"); 101 103 } 102 104 -
TabularUnified tests/numericConstants.cfa ¶
ra6b48f6 r2853d6f 64 64 0x_1.ffff_ffff_p_128_l; 65 65 66 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 66 printf("done\n"); 67 67 } // main 68 68 -
TabularUnified tests/quasiKeyword.cfa ¶
ra6b48f6 r2853d6f 13 13 14 14 exception E {}; 15 vtable(E) E_vt; 15 16 16 void catch( int i ) {}17 void recover( int i ) {}18 void catchResume( int i ) { }19 void fixup( int i ) {}20 void finally( int i ) {}17 void catch( int i ) { (void) i; } 18 void recover( int i ) { (void) i; } 19 void catchResume( int i ) { (void) i; } 20 void fixup( int i ) { (void) i; } 21 void finally( int i ) { (void) i; } 21 22 22 int main( int argc, char const *argv[]) {23 int main() { 23 24 int catch, recover, catchResume, fixup, finally; 24 25 try { … … 33 34 finally = 3; 34 35 finally( finally ); 35 throw (E){ };36 report (E){ };37 throwResume (E){ };36 throw (E){ & E_vt }; 37 report (E){ & E_vt }; 38 throwResume (E){ & E_vt }; 38 39 } catch ( E * ) { 39 40 } recover ( E * ) { // same as catch … … 50 51 else catch = 3; 51 52 52 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 53 printf("done\n"); 53 54 } -
TabularUnified tests/switch.cfa ¶
ra6b48f6 r2853d6f 101 101 } // choose 102 102 103 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 103 printf("done\n"); 104 104 } // main 105 105 -
TabularUnified tests/typedefRedef.cfa ¶
ra6b48f6 r2853d6f 78 78 #endif 79 79 80 Foo * x; 80 Foo * x; (void) x; 81 81 82 82 typedef struct Bar Foo; 83 Foo * y; 83 Foo * y; (void) y; 84 84 85 85 typedef int *** pt; 86 86 87 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 87 printf("done\n"); 88 88 } -
TabularUnified tests/variableDeclarator.cfa ¶
ra6b48f6 r2853d6f 93 93 int (f66)(int); 94 94 95 #pragma GCC diagnostic push 96 #pragma GCC diagnostic ignored "-Wignored-qualifiers" 97 95 98 int * f67(int); 96 99 int ** f68(int); … … 112 115 int (*(* const f80)(int))(); 113 116 int (* const(* const f81)(int))(); 117 118 #pragma GCC diagnostic pop 114 119 115 120 // errors … … 166 171 [int] cf66(int); 167 172 173 #pragma GCC diagnostic push 174 #pragma GCC diagnostic ignored "-Wignored-qualifiers" 175 168 176 [* int] cf67(int); 169 177 [* * int] cf68(int); 170 178 [const * * int] cf69(int); 171 179 [const * const * int] cf70(int); 180 181 #pragma GCC diagnostic pop 172 182 173 183 // function pointer … … 177 187 178 188 //Dummy main 179 int main( int argc, char const * argv[]) {180 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!!189 int main() { 190 printf("done\n"); 181 191 } 182 192 -
TabularUnified tests/warnings/.expect/self-assignment.txt ¶
ra6b48f6 r2853d6f 1 warnings/self-assignment.cfa:34:25: warning: Compiled2 1 warnings/self-assignment.cfa:29:1 warning: self assignment of expression: Generated Cast of: 3 2 Variable Expression: j: signed int -
TabularUnified tests/warnings/self-assignment.cfa ¶
ra6b48f6 r2853d6f 22 22 }; 23 23 24 int main() {24 void f() { 25 25 int j = 0; 26 26 S s = { 0 }; … … 32 32 t.s.i = t.s.i; 33 33 34 #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! 34 // Is compiled -fsyntax-only (not run), to make the test's "output" be the warnings from cfa-cpp. 35 35 } 36 36
Note: See TracChangeset
for help on using the changeset viewer.