cvt.c (ocp_convert): Don't warn the address of a weak function is always `true'.
authorH.J. Lu <hjl@gnu.org>
Mon, 12 Nov 2001 18:18:05 +0000 (18:18 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 12 Nov 2001 18:18:05 +0000 (10:18 -0800)
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'.

From-SVN: r46960

gcc/cp/ChangeLog
gcc/cp/cvt.c

index 78588d77c936886b9b948f5b271f4bfaa220b146..f7b629626cd26390ab9104aeba414b2f1fea417c 100644 (file)
@@ -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,
index f8845b29d7fd44bbf1787f52199b19fc54e4c8f1..81d05777308fc846c29f641a9968d1efb2cbebce 100644 (file)
@@ -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);
        }