]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/18644 (-Wsynth warning in <complex>)
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Mon, 4 Apr 2005 07:42:34 +0000 (07:42 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Mon, 4 Apr 2005 07:42:34 +0000 (07:42 +0000)
        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
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.jason/warning9.C

index 7ce193150f9021ab76536f7d2b89abd2d30bfcb9..f5856ef2cbdc9628ae752cde1580f2f8bfd9e262 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       PR c++/18644
+       * doc/invoke.texi (-Wsynth): Remove documentation.
+
 2005-03-28  James E Wilson  <wilson@specifixinc.com>
 
        PR target/20286.
index 0ac9f3a5db367c908dbd5bc804ca70360b1d2ab9..38368114709ae49cd1f3db4b9029c9c7dc6cf79d 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       PR c++/18644
+       * call.c (build_new_op): Remove check for warn_synth.
+
 2004-12-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/17456
index 727698a0d10604fb74d2fa4e657a7b23b996309a..2cb233c091e320e9fc11ef899699de2c9841787c 100644 (file)
@@ -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)
index 22a0e6bbdf1e04f55241ce95cb74779601ba3245..819203be617c3ef75cfd0edc5894c4ee80dfacbf 100644 (file)
@@ -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
index ee7b6ed3031fafaa0ab45e3b17b17eeb2313da61..99cbc98bf32e2defa379090caa45d283d183f48e 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       PR c++/18644
+       * g++.old-deja/g++.jason/warning9.C (struct A, main): Adjust.
+
 2005-01-22  Roger Sayle  <roger@eyesopen.com>
 
        PR target/18402
index d46ba37650cdd97b80cafc3ac943cc18579f14b2..ca9b3a33f9c3ee1a1c7cfbb2eb35a30cbc8140be 100644 (file)
@@ -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;
 }