projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f3ed417
)
Rename warn_function_address_as_bool() to warn_reference_address_as_bool(), because...
author
Christoph Mallon
<christoph.mallon@gmx.de>
Sun, 16 Nov 2008 07:22:42 +0000
(07:22 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Sun, 16 Nov 2008 07:22:42 +0000
(07:22 +0000)
[r23696]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
72f91ef
..
12b9d7d
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-8125,7
+8125,7
@@
static expression_t const *get_reference_address(expression_t const *expr)
return expr;
}
return expr;
}
-static void warn_
function
_address_as_bool(expression_t const* expr)
+static void warn_
reference
_address_as_bool(expression_t const* expr)
{
if (!warning.address)
return;
{
if (!warning.address)
return;
@@
-8147,7
+8147,7
@@
static void semantic_not(unary_expression_t *expression)
"operand of ! must be of scalar type");
}
"operand of ! must be of scalar type");
}
- warn_
function
_address_as_bool(expression->value);
+ warn_
reference
_address_as_bool(expression->value);
expression->base.type = c_mode & _CXX ? type_bool : type_int;
}
expression->base.type = c_mode & _CXX ? type_bool : type_int;
}
@@
-8747,8
+8747,8
@@
static void semantic_logical_op(binary_expression_t *expression)
type_t *const type_left = skip_typeref(orig_type_left);
type_t *const type_right = skip_typeref(orig_type_right);
type_t *const type_left = skip_typeref(orig_type_left);
type_t *const type_right = skip_typeref(orig_type_right);
- warn_
function
_address_as_bool(left);
- warn_
function
_address_as_bool(right);
+ warn_
reference
_address_as_bool(left);
+ warn_
reference
_address_as_bool(right);
if (!is_type_scalar(type_left) || !is_type_scalar(type_right)) {
/* TODO: improve error message */
if (!is_type_scalar(type_left) || !is_type_scalar(type_right)) {
/* TODO: improve error message */