History

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.

Thomas Preud'homme committed 15 years ago

Commit b2f5ee91 parent 339f9611 file · +1 −1Browse files

Unified · Split

tccgen.c+1−1
@@ -4038,7 +4038,7 @@ static void expr_cond(void) · 4037 unmodified lines
4038 SValue sv;4038 SValue sv;
4039 CType type, type1, type2;4039 CType type, type1, type2;
4040 4040
4041 if (const_wanted) {4041 if (const_wanted || (cur_text_section == NULL)) {
4042 expr_lor_const();4042 expr_lor_const();
4043 if (tok == '?') {4043 if (tok == '?') {
4044 CType boolean;4044 CType boolean;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t