restore a linux 2.4.26 kernel compilation (commit 5bcc3eed7b 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 5bcc3eed7b and breaks compilation
of the linux 2.4.26 kernel.
This commit is contained in:
seyko 2015-03-20 10:44:26 +03:00
parent e3851d233f
commit 78c076a70f

View File

@ -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