projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
42fd815
)
Set the result type of !, even if the operand type is not scalar.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 27 Aug 2008 09:07:41 +0000
(09:07 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 27 Aug 2008 09:07:41 +0000
(09:07 +0000)
[r21496]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
c26ca18
..
b278121
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-6990,11
+6990,8
@@
static void semantic_not(unary_expression_t *expression)
{
type_t *const orig_type = expression->value->base.type;
type_t *const type = skip_typeref(orig_type);
{
type_t *const orig_type = expression->value->base.type;
type_t *const type = skip_typeref(orig_type);
- if (!is_type_scalar(type)) {
- if (is_type_valid(type)) {
- errorf(HERE, "operand of ! must be of scalar type");
- }
- return;
+ if (!is_type_scalar(type) && is_type_valid(type)) {
+ errorf(HERE, "operand of ! must be of scalar type");
}
expression->base.type = type_int;
}
expression->base.type = type_int;