This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/2065: Annoying invalid message on compiler-generated copy constructor -- regression vs. 2.95
- To: nobody at gcc dot gnu dot org
- Subject: Re: c++/2065: Annoying invalid message on compiler-generated copy constructor -- regression vs. 2.95
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: 26 Feb 2001 04:36:01 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Phil Edwards <pedwards at disaster dot jaj dot com>
The following reply was made to PR c++/2065; it has been noted by GNATS.
From: Phil Edwards <pedwards@disaster.jaj.com>
To: wolfgang.bangerth@iwr.uni-heidelberg.de
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/2065: Annoying invalid message on compiler-generated copy constructor -- regression vs. 2.95
Date: Sun, 25 Feb 2001 23:38:56 -0500
On Fri, Feb 23, 2001 at 07:45:47AM -0000, wolfgang.bangerth@iwr.uni-heidelberg.de wrote:
>
> >Number: 2065
> >Category: c++
> >Synopsis: Annoying invalid message on compiler-generated copy constructor -- regression vs. 2.95
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: unassigned
> >State: open
> >Class: rejects-legal
> >Submitter-Id: net
> >Arrival-Date: Thu Feb 22 23:46:00 PST 2001
> >Closed-Date:
> >Last-Modified:
> >Originator: Wolfgang Bangerth
> >Release: unknown-1.0
> >Organization:
> >Environment:
> gcc version 3.0 20010221 (prerelease), Sun Solaris 2.7
> >Description:
> This is rather annoying, since it generates warnings from
> libstdc++ files for me all over the place in string and
> exception classes, and one can not work around without
> switching off warnings.
It's -W / -Wunused. It looks like the generated copy constructor
isn't getting DECL_ARTIFICIAL set properly. It's being set in
implicitly_declare_fn(), but the flag is no longer set when unused variables
are checked.
(I *think* that's the case. Every time I try to investigate, gdb dumps
core.)
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.