History

struct syntax fix

bellard committed 23 years ago

Commit eed54d61 parent 3605c501 file · +3 −2Browse files

Unified · Split

tcc.c+3−2
@@ -1523,7 +1523,7 @@ static Sym *sym_find2(Sym *s, int v) · 1522 unmodified lines
15231523 }
15241524
15251525 /* structure lookup */
1526−static Sym *struct_find(int v)
1526+static inline Sym *struct_find(int v)
15271527 {
15281528 v -= TOK_IDENT;
15291529 if ((unsigned)v >= (unsigned)(tok_ident - TOK_IDENT))
@@ -5843,7 +5843,8 @@ static void struct_decl(CType *type, int u) · 4313 unmodified lines
58435843 v = tok;
58445844 next();
58455845 /* struct already defined ? return it */
5846− /* XXX: check consistency */
5846+ if (v < TOK_IDENT)
5847+ expect("struct/union/enum name");
58475848 s = struct_find(v);
58485849 if (s) {
58495850 if (s->type.t != a)

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