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
31113111 /* NOTE: const is ignored in returned type as it has a special
31123112 meaning in gcc / C++ */
31133113 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()" */
31143117 post_type(type, ad);
31153118 /* we push a anonymous symbol which will contain the function prototype */
31163119 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