remove unused features for TINY mode

tcc-xref
bellard 2001-10-28 04:08:38 +00:00
parent 3115a8a38b
commit 586b05f7e6
1 changed files with 11 additions and 6 deletions

17
tcc.c
View File

@ -261,7 +261,6 @@ int oad(c, s)
return s; return s;
} }
/* push to value stack */
void vset(t, v) void vset(t, v)
{ {
vt = t; vt = t;
@ -530,11 +529,15 @@ void unary()
/* number */ /* number */
vset(VT_CONST, getn(tok, 10)); vset(VT_CONST, getn(tok, 10));
next(); next();
} else if (tok == '\'') { } else
#ifndef TINY
if (tok == '\'') {
vset(VT_CONST, getq(inp())); vset(VT_CONST, getq(inp()));
next(); /* skip char */ next(); /* skip char */
skip('\''); skip('\'');
} else if (tok == '\"') { } else
#endif
if (tok == '\"') {
vset(VT_CONST | VT_PTRINC | VT_BYTE, glo); vset(VT_CONST | VT_PTRINC | VT_BYTE, glo);
while (tok == '\"') { while (tok == '\"') {
while((n = inp()) != 34) { while((n = inp()) != 34) {
@ -593,6 +596,9 @@ void unary()
o(0xd0f7); o(0xd0f7);
} }
} else } else
if (t == '+') {
unary();
} else
#endif #endif
if (t == TOK_INC | t == TOK_DEC) { if (t == TOK_INC | t == TOK_DEC) {
unary(); unary();
@ -605,9 +611,8 @@ void unary()
gv(); gv();
o(0xd8f7); /* neg %eax */ o(0xd8f7); /* neg %eax */
} }
} else if (t == '+') { } else
unary(); {
} else {
vset(vat[t], vac[t]); vset(vat[t], vac[t]);
/* forward reference or external reference ? */ /* forward reference or external reference ? */
if (vt == 0) { if (vt == 0) {