This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] warn_synth considered obsolete
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc at integrable-solutions dot net
- Cc: gcc at gcc dot gnu dot org, jason at redhat dot com
- Date: Sun, 02 Jan 2005 18:48:53 -0800
- Subject: Re: [C++] warn_synth considered obsolete
- Organization: CodeSourcery, LLC
- References: <m13bxkuf41.fsf@uniton.integrable-solutions.net>
gcc@integrable-solutions.net wrote:
Hi,
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
useful?
It means exactly what it says: Cfront would not have synthesized a copy
assignment operator when there is a user-declared version. In other
words, it is saying that Cfront treated operator= like a default
constructor; once you declare one, the default (no-argument) constructor
is never synthesized. (I was not aware of this behavior in Cfront, but
that is what the manual and the warning suggest.)
from cp/call.c:build_new_op(). That removal would make the switch
actually unused; consequently I propose to deprecate it.
There's no point in deprecating an option that isn't used for anything;
we deprecate things only when we're leaving them operational, but
warning users that they're going away. In this case, I think it's fine
to remove the code, but then you should also update the manual, the
changes HTML page. You should also make sure that the compiler still
accepts the option. (In that sense, the option would indeed be deprecated.)
Such a patch is OK, as it is a low-risk way of solving this regression.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304