tccgen: nocode_wanted: do not output constants

This for example suppresses string constants such as with

    int main()
    {
        return sizeof "foo";
    }

Actually, setting

    nocode_wanted = 1;

in libtcc.c for the initial global level seemed wrong, since
obviously "nocode_wanted" means code as any side effects, also
such as string constants.

This reverts a part of 2de1b2d14c
(documented as "Some in-between fixes" in Changelog)
This commit is contained in:
grischka
2014-08-01 10:59:38 +02:00
parent 12f43953ed
commit 14745bdeb7
2 changed files with 18 additions and 16 deletions

View File

@ -778,7 +778,6 @@ static int tcc_compile(TCCState *s1)
#endif
define_start = define_stack;
nocode_wanted = 1;
if (setjmp(s1->error_jmp_buf) == 0) {
s1->nb_errors = 0;