History

fixed function type check

bellard committed 21 years ago

Commit 44738b51 parent c42532c1 file · +2 −2Browse files

Unified · Split

tcc.c+2−2
@@ -8992,7 +8992,7 @@ static void decl(int l) · 8991 unmodified lines
89928992 #if 0
89938993 {
89948994 char buf[500];
8995− type_to_str(buf, sizeof(buf), t, get_tok_str(v, NULL));
8995+ type_to_str(buf, sizeof(buf), &type, get_tok_str(v, NULL));
89968996 printf("type = '%s'\n", buf);
89978997 }
89988998 #endif
@@ -9007,7 +9007,7 @@ static void decl(int l) · 8 unmodified lines
90079007 if (tok == '{') {
90089008 if (l == VT_LOCAL)
90099009 error("cannot use local functions");
9010− if (!(type.t & VT_FUNC))
9010+ if ((type.t & VT_BTYPE) != VT_FUNC)
90119011 expect("function definition");
90129012
90139013 /* reject abstract declarators in function definition */

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