projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
928c95e
)
Improve error recovery, if the : of a ?: operator is missing.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Mon, 8 Dec 2008 11:11:44 +0000
(11:11 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Mon, 8 Dec 2008 11:11:44 +0000
(11:11 +0000)
[r24388]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
6058419
..
598f61c
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-8242,6
+8242,7
@@
static expression_t *parse_conditional_expression(expression_t *expression)
}
rem_anchor_token(':');
expect(':', end_error);
+end_error:;
expression_t *false_expression =
parse_sub_expression(c_mode & _CXX ? PREC_ASSIGNMENT : PREC_CONDITIONAL);
@@
-8350,8
+8351,6
@@
static expression_t *parse_conditional_expression(expression_t *expression)
= create_implicit_cast(false_expression, result_type);
conditional->base.type = result_type;
return result;
-end_error:
- return create_invalid_expression();
}
/**