Fix handling of unevaluated subexpression of const
commit4a70b2bc2d080baa4082d9d902f9172f88021019
authorMichael Matz <matz@suse.de>
Wed, 15 Jan 2020 22:32:40 +0000 (15 23:32 +0100)
committerMichael Matz <matz@suse.de>
Wed, 15 Jan 2020 22:32:40 +0000 (15 23:32 +0100)
tree95986f95816b12a663af01b68788da4be60f9db4
parent387761878500df5a5f883139ec1013bb3696dad2
Fix handling of unevaluated subexpression of const

we were emitting error messages for something like
'static int i = 2 || 1/0', even though the exception would be in
the unevaluated part.  This doesn't destroy const-ness, so we must
accept it.  This requires splitting the nocode_wanted values a bit more,
so that nocode_wanted due to const_wanted can be differentiated from
nocode_wanted due to non-evaluation.
tccgen.c
tests/tcctest.c
tests/tests2/60_errors_and_warnings.c
tests/tests2/60_errors_and_warnings.expect