Changeset 320eb73a
- Timestamp:
- Jan 30, 2018, 4:37:58 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 633a642
- Parents:
- c1135eef
- git-author:
- Peter A. Buhr <pabuhr@…> (01/30/18 16:32:42)
- git-committer:
- Peter A. Buhr <pabuhr@…> (01/30/18 16:37:58)
- Location:
- src/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/functions.c
rc1135eef r320eb73a 10 10 // Created On : Wed Aug 17 08:39:58 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Nov 27 18:08:54 201713 // Update Count : 1 112 // Last Modified On : Wed Jan 17 22:44:12 2018 13 // Update Count : 12 14 14 // 15 15 … … 25 25 void g(void) 26 26 ) { 27 (* g)();27 (* g)(); 28 28 g(); 29 29 g = h; … … 32 32 int f1() {} 33 33 int (f2()) {} 34 int (* f3())() {}35 int * ((f4())) {}36 int ((* f5()))() {}37 int * f6() {}38 int * (f7)() {}39 int ** f8() {}40 int * const * (f9)() {}41 int (* f10())[] {}42 int (* f11())[][3] {}43 int ((* f12())[])[3] {}34 int (* f3())() {} 35 int * ((f4())) {} 36 int ((* f5()))() {} 37 int * f6() {} 38 int * (f7)() {} 39 int ** f8() {} 40 int * const * (f9)() {} 41 int (* f10())[] {} 42 int (* f11())[][3] {} 43 int ((* f12())[])[3] {} 44 44 45 45 // "implicit int" otype specifier (not ANSI) … … 50 50 extern const fII4( int i ) {} 51 51 52 * fII5() {}53 const * fII6() {}54 const long * fII7() {}55 static const long * fII8() {}56 const static long * fII9() {}52 * fII5() {} 53 const * fII6() {} 54 const long * fII7() {} 55 static const long * fII8() {} 56 const static long * fII9() {} 57 57 58 58 // K&R function definitions … … 117 117 [int](int) 118 118 ) { 119 int (* (*pc)[][10])[][3];119 int (* (* pc)[][10])[][3]; 120 120 * [][10] * [][3] int p; 121 121 * [] * [int](int) p; 122 122 } 123 123 124 static const int * f1() {}124 static const int * f1() {} 125 125 static [ const int ] f2() {} 126 126 static inline [ const * int ] f3() {} … … 133 133 int (), 134 134 135 int * (),136 int ** (),137 int * const * (),135 int * (), 136 int ** (), 137 int * const * (), 138 138 int * const * const (), 139 139 … … 141 141 int ([10]), 142 142 143 int * ([]),144 int * ([10]),145 int ** ([]),146 int ** ([10]),147 int * const * ([]),148 int * const * ([10]),143 int * ([]), 144 int * ([10]), 145 int ** ([]), 146 int ** ([10]), 147 int * const * ([]), 148 int * const * ([10]), 149 149 int * const * const ([]), 150 150 int * const * const ([10]) … … 154 154 int (), 155 155 156 int * (),157 int ** (),158 int * const * (),156 int * (), 157 int ** (), 158 int * const * (), 159 159 int * const * const (), 160 160 … … 162 162 int ([10]), 163 163 164 int * ([]),165 int * ([10]),166 int ** ([]),167 int ** ([10]),168 int * const * ([]),169 int * const * ([10]),164 int * ([]), 165 int * ([10]), 166 int ** ([]), 167 int ** ([10]), 168 int * const * ([]), 169 int * const * ([10]), 170 170 int * const * const ([]), 171 171 int * const * const ([10]) … … 175 175 typedef int T; 176 176 177 int f( T (* f), T t ) {177 int f( T (* f), T t ) { 178 178 T (T); 179 179 } … … 184 184 //int (f[])() {} 185 185 //int f[]() {} 186 //int ((* f15())())[] {}186 //int ((* f15())())[] {} 187 187 188 188 // Local Variables: // -
src/tests/identFuncDeclarator.c
rc1135eef r320eb73a 10 10 // Created On : Wed Aug 17 08:36:34 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 17 08:37:06 201613 // Update Count : 112 // Last Modified On : Wed Jan 17 22:39:13 2018 13 // Update Count : 2 14 14 // 15 15 … … 18 18 int (f2); 19 19 20 int * f3;21 int ** f4;22 int * const * f5;20 int * f3; 21 int ** f4; 22 int * const * f5; 23 23 int * const * const f6; 24 24 25 int * (f7);26 int ** (f8);27 int * const * (f9);25 int * (f7); 26 int ** (f8); 27 int * const * (f9); 28 28 int * const * const (f10); 29 29 30 int (* f11);31 int (** f12);32 int (* const * f13);30 int (* f11); 31 int (** f12); 32 int (* const * f13); 33 33 int (* const * const f14); 34 34 … … 38 38 int (f18[10]); 39 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];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 46 int * const * const f25[2]; 47 47 int * const * const f26[10]; 48 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]);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 55 int * const * const (f33[2]); 56 56 int * const * const (f34[10]); 57 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]);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 64 int (* const * const f41[2]); 65 65 int (* const * const f42[10]); … … 72 72 int ((f48[3]))[3]; 73 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];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 80 int * const * const f55[2][3]; 81 81 int * const * const f56[3][3]; 82 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]);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 89 int (* const * const f63[2][3]); 90 90 int (* const * const f64[3][3]); … … 93 93 int (f66)(int); 94 94 95 int * f67(int);96 int ** f68(int);97 int * const * f69(int);95 int * f67(int); 96 int ** f68(int); 97 int * const * f69(int); 98 98 int * const * const f70(int); 99 99 100 int * (f71)(int);101 int ** (f72)(int);102 int * const * (f73)(int);100 int * (f71)(int); 101 int ** (f72)(int); 102 int * const * (f73)(int); 103 103 int * const * const (f74)(int); 104 104 105 int (* f75)(int);106 int (** f76)(int);107 int (* const * f77)(int);105 int (* f75)(int); 106 int (** f76)(int); 107 int (* const * f77)(int); 108 108 int (* const * const f78)(int); 109 109 110 int (* (*f79)(int))();111 int (* (* const f80)(int))();110 int (* (* f79)(int))(); 111 int (* (* const f80)(int))(); 112 112 int (* const(* const f81)(int))(); 113 113 } -
src/tests/identParamDeclarator.c
rc1135eef r320eb73a 10 10 // Created On : Wed Aug 17 08:37:56 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 17 08:38:42 201613 // Update Count : 112 // Last Modified On : Wed Jan 17 22:36:11 2018 13 // Update Count : 2 14 14 // 15 15 16 int fred (16 int fred ( 17 17 int f1, 18 18 int (f2), … … 157 157 ); 158 158 159 //Dummy main 160 int main(int argc, char const *argv[]) 161 { 159 int main( int argc, char const *argv[] ) { // dummy main 162 160 return 0; 163 161 }
Note: See TracChangeset
for help on using the changeset viewer.