diff options
| author | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2011-07-30 22:57:53 +0200 |
|---|---|---|
| committer | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2011-07-31 00:19:13 +0200 |
| commit | b2f5ee9b2de40e26ba3d92cf3950be6da7766b7d (patch) | |
| tree | 01569c465e8e0e539f1d8648ce953216b9f6801f | |
| parent | 339f961c115fcff68d94026b930b6840fe023eb7 (diff) | |
| download | tinycc-b2f5ee9b2de40e26ba3d92cf3950be6da7766b7d.tar.gz tinycc-b2f5ee9b2de40e26ba3d92cf3950be6da7766b7d.tar.bz2 | |
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.
| -rw-r--r-- | tccgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |
