History

added a note clarifying post_type() recursion

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

Joe Soroka committed 15 years ago

Commit 772b3021 parent 585027a1 file · +3 −0Browse files

Unified · Split

tccgen.c+3−0
@@ -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 special3111 /* 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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t