projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4dc2ed
)
Handle void expressions in conditional expressions.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Tue, 20 Nov 2007 18:22:49 +0000
(18:22 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Tue, 20 Nov 2007 18:22:49 +0000
(18:22 +0000)
[r18498]
ast2firm.c
patch
|
blob
|
history
diff --git
a/ast2firm.c
b/ast2firm.c
index
0844357
..
f7d715a
100644
(file)
--- a/
ast2firm.c
+++ b/
ast2firm.c
@@
-1311,6
+1311,9
@@
static ir_node *conditional_to_firm(const conditional_expression_t *expression)
add_immBlock_pred(common_block, false_jmp);
mature_immBlock(common_block);
+ /* TODO improve static semantics, so either both or no values are NULL */
+ if (true_val == NULL || false_val == NULL) return NULL;
+
ir_node *in[2] = { true_val, false_val };
ir_mode *mode = get_irn_mode(true_val);
assert(get_irn_mode(false_val) == mode);