aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-03-20 10:44:26 +0300
committerseyko <seyko2@gmail.com>2015-03-20 10:44:26 +0300
commit78c076a70f562fc88bcd6e467bfe61b856f91fbd (patch)
tree7ac1d6b2b0c780646424bc22976e835dbf3388e0 /tccgen.c
parente3851d233f7a636e65a3eb00e51dee2120aaf087 (diff)
downloadtinycc-78c076a70f562fc88bcd6e467bfe61b856f91fbd.tar.gz
tinycc-78c076a70f562fc88bcd6e467bfe61b856f91fbd.tar.bz2
restore a linux 2.4.26 kernel compilation (commit 5bcc3eed7b93 correction)
The following check in tccgen.c is removed if (nocode_wanted) tcc_error("statement expression in global scope"); This check is introduced in commit 5bcc3eed7b93 and breaks compilation of the linux 2.4.26 kernel.
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tccgen.c b/tccgen.c
index f757453..8c30c40 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3776,8 +3776,12 @@ ST_FUNC void unary(void)
gen_cast(&type);
}
} else if (tok == '{') {
+ /*
if (nocode_wanted)
- tcc_error("statement expression in global scope");
+ tcc_error("statement expression in global scope"); */
+ /* this check breaks compilation of the linux 2.4.26 with the meesage:
+ linux/include/net/tcp.h:945: error: statement expression in global scope */
+
/* save all registers */
save_regs(0);
/* statement expression : we do not accept break/continue