summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-12 18:18:05 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-12 18:18:05 +0000
commit1d2ca10cb75a5335b101601fe4c060454fc8e424 (patch)
tree9bf2e7fa802a8b35eceb9387e4415a687f6e3f45
parent606a69021a0d3b7c0d84355a0e9699c93c58c0ff (diff)
downloadgcc-1d2ca10cb75a5335b101601fe4c060454fc8e424.tar.gz
2001-11-12 H.J. Lu <hjl@gnu.org>
* cp/cvt.c (ocp_convert): Don't warn the address of a weak function is always `true'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46960 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cvt.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 78588d77c93..f7b629626cd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-12 H.J. Lu <hjl@gnu.org>
+
+ * cp/cvt.c (ocp_convert): Don't warn the address of a weak
+ function is always `true'.
+
2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index f8845b29d7f..81d05777308 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -814,7 +814,7 @@ ocp_convert (type, expr, convtype, flags)
else if (TREE_CODE (expr) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (expr, 0)) == FUNCTION_DECL)
fn = TREE_OPERAND (expr, 0);
- if (fn)
+ if (fn && !DECL_WEAK (fn))
cp_warning ("the address of `%D', will always be `true'", fn);
return cp_truthvalue_conversion (e);
}