This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++] warn_synth considered obsolete


While looking into PR C++/18644, it occurs to me that the option
-Wsynth is no longer useful. 

   First, the diagnostic does not make any sense to me.  Does anybody
understand it, what it is trying to say and how it could have been

   Second, the compiler has long deviated from (pre) C++-ARM
semantics and there is no way to revert to C++-ARM (assuming that
makes sense).

   Third, there remains only *one* use of warn_synth in the whole C++
front-end; looking at the ChangeLogs it seems to me that its
application area has shrinked over the time.

  My suggestion to fix C++/18644 is to remove the code

          if (warn_synth
              && fnname == ansi_assopname (NOP_EXPR)
              && DECL_ARTIFICIAL (cand->fn)
              && candidates->next
              && ! candidates->next->next)
              warning ("using synthesized %q#D for copy assignment",
              cp_warning_at ("  where cfront would use %q#D",
                             cand == candidates
                             ? candidates->next->fn
                             : candidates->fn);

from cp/call.c:build_new_op().  That removal would make the switch
actually unused; consequently I propose to deprecate it.


-- Gaby

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]