projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a7d1c10
)
Fix get_reference_address(), which was broken in r23351.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Sun, 16 Nov 2008 07:21:05 +0000
(07:21 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Sun, 16 Nov 2008 07:21:05 +0000
(07:21 +0000)
[r23695]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
852f73a
..
72f91ef
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-8112,14
+8112,17
@@
static expression_t const *get_reference_address(expression_t const *expr)
expr = expr->unary.value;
}
expr = expr->unary.value;
}
+ if (expr->kind != EXPR_REFERENCE)
+ return NULL;
+
/* special case for functions which are automatically converted to a
* pointer to function without an extra TAKE_ADDRESS operation */
/* special case for functions which are automatically converted to a
* pointer to function without an extra TAKE_ADDRESS operation */
- if (!regular_take_address &&
expr->kind == EXPR_REFERENCE
-
&& expr->reference.entity->kind =
= ENTITY_FUNCTION) {
- return
expr
;
+ if (!regular_take_address &&
+
expr->reference.entity->kind !
= ENTITY_FUNCTION) {
+ return
NULL
;
}
}
- return
NULL
;
+ return
expr
;
}
static void warn_function_address_as_bool(expression_t const* expr)
}
static void warn_function_address_as_bool(expression_t const* expr)