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
1523}1523}
1524 1524
1525/* structure lookup */1525/* structure lookup */
1526static Sym *struct_find(int v)1526static inline Sym *struct_find(int v)
1527{1527{
1528 v -= TOK_IDENT;1528 v -= TOK_IDENT;
1529 if ((unsigned)v >= (unsigned)(tok_ident - TOK_IDENT))1529 if ((unsigned)v >= (unsigned)(tok_ident - TOK_IDENT))
@@ -5843,7 +5843,8 @@ static void struct_decl(CType *type, int u) · 4313 unmodified lines
5843 v = tok;5843 v = tok;
5844 next();5844 next();
5845 /* struct already defined ? return it */5845 /* struct already defined ? return it */
5846 /* XXX: check consistency */5846 if (v < TOK_IDENT)
5847 expect("struct/union/enum name");
5847 s = struct_find(v);5848 s = struct_find(v);
5848 if (s) {5849 if (s) {
5849 if (s->type.t != a)5850 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