From 9a3bbc2913662670682efdd50f1a3a3a647b3639 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Mon, 4 Apr 2005 07:42:34 +0000 Subject: [PATCH] re PR c++/18644 (-Wsynth warning in ) PR c++/18644 * doc/invoke.texi (-Wsynth): Remove documentation. cp/ PR c++/18644 * call.c (build_new_op): Remove check for warn_synth. testsuite/ PR c++/18644 * g++.old-deja/g++.jason/warning9.C (struct A, main): Adjust. From-SVN: r97524 --- gcc/ChangeLog | 5 ++++ gcc/cp/ChangeLog | 5 ++++ gcc/cp/call.c | 27 ++++--------------- gcc/doc/invoke.texi | 25 +---------------- gcc/testsuite/ChangeLog | 5 ++++ .../g++.old-deja/g++.jason/warning9.C | 4 +-- 6 files changed, 23 insertions(+), 48 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7ce193150f90..f5856ef2cbdc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-04-04 Gabriel Dos Reis + + PR c++/18644 + * doc/invoke.texi (-Wsynth): Remove documentation. + 2005-03-28 James E Wilson PR target/20286. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0ac9f3a5db36..38368114709a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2005-04-04 Gabriel Dos Reis + + PR c++/18644 + * call.c (build_new_op): Remove check for warn_synth. + 2004-12-18 Volker Reichelt PR c++/17456 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 727698a0d106..2cb233c091e3 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3762,28 +3762,11 @@ build_new_op (code, flags, arg1, arg2, arg3) } if (TREE_CODE (cand->fn) == FUNCTION_DECL) - { - extern int warn_synth; - if (warn_synth - && fnname == ansi_assopname (NOP_EXPR) - && DECL_ARTIFICIAL (cand->fn) - && candidates->next - && ! candidates->next->next) - { - warning ("using synthesized `%#D' for copy assignment", - cand->fn); - cp_warning_at (" where cfront would use `%#D'", - cand == candidates - ? candidates->next->fn - : candidates->fn); - } - - return build_over_call - (cand, - TREE_CODE (TREE_TYPE (cand->fn)) == METHOD_TYPE - ? mem_arglist : arglist, - LOOKUP_NORMAL); - } + return build_over_call + (cand, + TREE_CODE (TREE_TYPE (cand->fn)) == METHOD_TYPE + ? mem_arglist : arglist, + LOOKUP_NORMAL); /* Check for comparison of different enum types. */ switch (code) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 22a0e6bbdf1e..819203be617c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -188,7 +188,7 @@ in the following sections. -Weffc++ -Wno-deprecated @gol -Wno-non-template-friend -Wold-style-cast @gol -Woverloaded-virtual -Wno-pmf-conversions @gol --Wsign-promo -Wsynth} +-Wsign-promo} @item Objective-C Language Options @xref{Objective-C Dialect Options,,Options Controlling Objective-C Dialect}. @@ -1716,29 +1716,6 @@ Warn when overload resolution chooses a promotion from unsigned or enumeral type to a signed type, over a conversion to an unsigned type of the same size. Previous versions of G++ would try to preserve unsignedness, but the standard mandates the current behavior. - -@item -Wsynth @r{(C++ only)} -@opindex Wsynth -@cindex warning for synthesized methods -@cindex synthesized methods, warning -Warn when G++'s synthesis behavior does not match that of cfront. For -instance: - -@smallexample -struct A @{ - operator int (); - A& operator = (int); -@}; - -main () -@{ - A a,b; - a = b; -@} -@end smallexample - -In this example, G++ will synthesize a default @samp{A& operator = -(const A&);}, while cfront will use the user-defined @samp{operator =}. @end table @node Objective-C Dialect Options diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ee7b6ed3031f..99cbc98bf32e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-04-04 Gabriel Dos Reis + + PR c++/18644 + * g++.old-deja/g++.jason/warning9.C (struct A, main): Adjust. + 2005-01-22 Roger Sayle PR target/18402 diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning9.C b/gcc/testsuite/g++.old-deja/g++.jason/warning9.C index d46ba37650cd..ca9b3a33f9c3 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/warning9.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/warning9.C @@ -2,12 +2,12 @@ struct A { operator int (); - A& operator= (int); // WARNING - not used below + A& operator= (int); }; main() { A a, b; - a = b; // WARNING - uses synthesized op= + a = b; } -- 2.47.2