- Timestamp:
- Oct 9, 2020, 11:22:58 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- a33704d
- Parents:
- 04423b53
- Location:
- tests
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/init1.txt
r04423b53 ree858bf 1 error: No reasonable alternatives for expression Untyped Init Expression 2 Name: rx InitAlternative: reference to signed int 3 error: No reasonable alternatives for expression Untyped Init Expression 4 Name: px InitAlternative: pointer to signed int 5 error: No reasonable alternatives for expression Untyped Init Expression 6 Name: crx InitAlternative: reference to float 7 error: No reasonable alternatives for expression Untyped Init Expression 8 Name: cpx InitAlternative: pointer to float 9 init1.cfa:94:1 error: No reasonable alternatives for expression Generated Cast of: 10 Name: rx 11 ... to: 12 reference to signed int 13 init1.cfa:97:1 error: No reasonable alternatives for expression Applying untyped: 14 Name: ?{} 15 ...to: 16 Generated Cast of: 17 Variable Expression: _retval_f_py: pointer to signed int 18 ... to: 19 reference to pointer to signed int 20 Name: px 21 22 init1.cfa:104:1 error: No reasonable alternatives for expression Generated Cast of: 23 Name: crx 24 ... to: 25 reference to float 26 init1.cfa:107:1 error: No reasonable alternatives for expression Applying untyped: 27 Name: ?{} 28 ...to: 29 Generated Cast of: 30 Variable Expression: _retval_f_py2: pointer to float 31 ... to: 32 reference to pointer to float 33 Name: cpx 34 35 init1.cfa:114:1 error: No reasonable alternatives for expression Generated Cast of: 36 Name: s 37 ... to: 38 reference to instance of type T (not function type) 39 init1.cfa:118:1 error: No reasonable alternatives for expression Applying untyped: 40 Name: ?{} 41 ...to: 42 Generated Cast of: 43 Variable Expression: _retval_anycvt: pointer to instance of type T (not function type) 44 ... to: 45 reference to pointer to instance of type T (not function type) 46 Name: s 47 1 init1.cfa: In function '_X1fFv___1': 2 init1.cfa:43:69: warning: initialization of 'int (*)(int)' from incompatible pointer type 'void (*)()' [-Wincompatible-pointer-types] 3 init1.cfa:44:29: warning: assignment to 'int (*)(int)' from incompatible pointer type 'void (*)()' [-Wincompatible-pointer-types] 4 init1.cfa: In function '_X4mainFi___1': 5 init1.cfa:132:9: note: #pragma message: Compiled -
tests/Makefile.am
r04423b53 ree858bf 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Sun Sep 27 19:01:41202014 ## Update Count : 8 413 ## Last Modified On : Fri Oct 9 23:13:07 2020 14 ## Update Count : 86 15 15 ############################################################################### 16 16 … … 141 141 142 142 SYNTAX_ONLY_CODE = expression typedefRedef variableDeclarator switch numericConstants identFuncDeclarator forall \ 143 limits nested-types stdincludes cast labelledExit array builtins/sync warnings/self-assignment143 init1 limits nested-types stdincludes cast labelledExit array builtins/sync warnings/self-assignment 144 144 $(SYNTAX_ONLY_CODE): % : %.cfa $(CFACCBIN) 145 145 $(CFACOMPILE_SYNTAX) … … 149 149 # use custom target since they require a custom define *and* have a name that doesn't match the file 150 150 alloc-ERROR : alloc.cfa $(CFACCBIN) 151 $(CFACOMPILE_SYNTAX) -DERR1 152 -cp $(test) $(abspath ${@}) 153 154 init1-ERROR : init1.cfa $(CFACCBIN) 151 155 $(CFACOMPILE_SYNTAX) -DERR1 152 156 -cp $(test) $(abspath ${@}) -
tests/init1.cfa
r04423b53 ree858bf 9 9 // Author : Michael Brooks 10 10 // Created On : Thu Jul 16 22:00:00 2020 11 // Last Modified By : Michael Brooks12 // Last Modified On : Thu Jul 16 22:00:00202013 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Oct 9 23:11:02 2020 13 // Update Count : 5 14 14 // 15 15 … … 41 41 const float * cpx2 = cpx; 42 42 43 int (* fp)( int ) = 0p; 44 fp = 0p; 45 43 46 // 44 47 // unsound initializations 45 48 // 46 49 50 #ifdef ERR1 47 51 // mismatched referenced type 48 52 int & ry = rx; … … 52 56 float & ry2 = crx; 53 57 float * py2 = cpx; 58 #endif // ERR1 54 59 } 55 60 … … 90 95 // 91 96 97 #ifdef ERR1 92 98 int & f_ry() { 93 99 float & rx = *0p; … … 119 125 return s; // mismatched referenced type 120 126 } 127 #endif // ERR1 128 129 int main() { 130 #pragma message( "Compiled" ) // force non-empty .expect file 131 }
Note: See TracChangeset
for help on using the changeset viewer.