From 6c6ed0ef928235a51966759aa3d6ca6cb960f334 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 23 Oct 2000 17:38:33 -0400 Subject: * call.c (equal_functions): Also call decls_match for extern "C" fns. From-SVN: r37024 --- gcc/cp/call.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/cp/call.c') diff --git a/gcc/cp/call.c b/gcc/cp/call.c index c31333e..ba77b64 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4931,14 +4931,16 @@ add_warning (winner, loser) } /* Returns true iff functions are equivalent. Equivalent functions are - not identical only if one is a function-local extern function. */ + not '==' only if one is a function-local extern function or if + both are extern "C". */ static inline int equal_functions (fn1, fn2) tree fn1; tree fn2; { - if (DECL_LOCAL_FUNCTION_P (fn1) || DECL_LOCAL_FUNCTION_P (fn2)) + if (DECL_LOCAL_FUNCTION_P (fn1) || DECL_LOCAL_FUNCTION_P (fn2) + || DECL_EXTERN_C_FUNCTION_P (fn1)) return decls_match (fn1, fn2); return fn1 == fn2; } -- cgit v1.1