Force const. expr. in expr_cond outside function

Since no code should be generated outside a function, force expr_cond to
only consider constant expression when outside a function since the
generic code can generate some code.
This commit is contained in:
Thomas Preud'homme 2011-07-30 22:57:53 +02:00
parent 339f961c11
commit b2f5ee9b2d

View File

@ -4038,7 +4038,7 @@ static void expr_cond(void)
SValue sv;
CType type, type1, type2;
if (const_wanted) {
if (const_wanted || (cur_text_section == NULL)) {
expr_lor_const();
if (tok == '?') {
CType boolean;