Commit abfc1ef6 by H.J. Lu Committed by H.J. Lu

cvt.c (ocp_convert): Don't warn the address of a weak function is always `true'.

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
parent 692b7eb3
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,
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment