projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51b293f
)
Fix r23842 for for statements without condition.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 20 Nov 2008 10:48:41 +0000
(10:48 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 20 Nov 2008 10:48:41 +0000
(10:48 +0000)
[r23843]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
149ec1c
..
ac95ff2
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-6047,10
+6047,14
@@
continue_for:;
expression_t const *const cond = fors->condition;
- if (!expression_returns(cond))
+ int val;
+ if (cond == NULL) {
+ val = 1;
+ } else if (expression_returns(cond)) {
+ val = determine_truth(cond);
+ } else {
return;
-
- int const val = cond == NULL ? 1 : determine_truth(cond);
+ }
if (val >= 0)
check_reachable(fors->body);