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
8992#if 08992#if 0
8993 {8993 {
8994 char buf[500];8994 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));
8996 printf("type = '%s'\n", buf);8996 printf("type = '%s'\n", buf);
8997 }8997 }
8998#endif8998#endif
@@ -9007,7 +9007,7 @@ static void decl(int l) · 8 unmodified lines
9007 if (tok == '{') {9007 if (tok == '{') {
9008 if (l == VT_LOCAL)9008 if (l == VT_LOCAL)
9009 error("cannot use local functions");9009 error("cannot use local functions");
9010 if (!(type.t & VT_FUNC))9010 if ((type.t & VT_BTYPE) != VT_FUNC)
9011 expect("function definition");9011 expect("function definition");
9012 9012
9013 /* reject abstract declarators in function definition */9013 /* 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