some ancient pre-K&R C allows a function to return an array and the array brackets to be put after the arguments, such that "int c()[]" means the same as "int[] c()" see: http://llvm.org/bugs/show_bug.cgi?id=2399 http://java.sun.com/docs/books/jls/third_edition/html/classes.html#38703
Unified · Split
| @@ -3111,6 +3111,9 @@ static void post_type(CType *type, AttributeDef *ad) · 3110 unmodified lines | |||
| 3111 | /* NOTE: const is ignored in returned type as it has a special | 3111 | /* NOTE: const is ignored in returned type as it has a special |
| 3112 | meaning in gcc / C++ */ | 3112 | meaning in gcc / C++ */ |
| 3113 | type->t &= ~(VT_STORAGE | VT_CONSTANT); | 3113 | type->t &= ~(VT_STORAGE | VT_CONSTANT); |
| 3114 | /* some ancient pre-K&R C allows a function to return an array | ||
| 3115 | and the array brackets to be put after the arguments, such | ||
| 3116 | that "int c()[]" means the same as "int[] c()" */ | ||
| 3114 | post_type(type, ad); | 3117 | post_type(type, ad); |
| 3115 | /* we push a anonymous symbol which will contain the function prototype */ | 3118 | /* we push a anonymous symbol which will contain the function prototype */ |
| 3116 | ad->func_args = arg_size; | 3119 | ad->func_args = arg_size; |