public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class
[not found] <20030222194559.9807.frank6thursday@aol.com>
@ 2003-08-05 14:55 ` reichelt at gcc dot gnu dot org
2003-08-05 14:56 ` reichelt at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-08-05 14:55 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9807
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|rejects-valid |diagnostic
Summary|Derived class object used as|[3.3 regression] Derived
|default parameter for base |class object used as default
|class reference requires |parameter for base class
|explicit cast to reference |reference requires explicit
|to base class |cast to reference to base
| |class
------- Additional Comments From reichelt at gcc dot gnu dot org 2003-08-05 14:55 -------
On mainline we now get
x.cc:9: error: invalid initialization of non-const reference of type 'A&'
from a temporary of type 'B'
x.cc:7: error: in passing argument 1 of `C::C(A&)'
for Wolfgang's small example. And I think that gcc is right here.
However, the error message on the 3.3 branch is still hosed:
x.cc:7: error: invalid type `B' for default argument to `A&'
x.cc:9: error: could not convert `B()' to `A&'
x.cc:7: error: in passing argument 1 of `C::C(A&)'
That's why I changed the keyword from "rejects-valid" to "diagnostic".
Since we already did better in 2.95.x (see below) I rate this as a
regression on the 3.3 branch
x.cc:7: invalid type `B' for default argument to `A &'
x.cc: In function `void __static_initialization_and_destruction_0(int, int)':
x.cc:9: initialization of non-const reference type `struct A &'
x.cc:9: from rvalue of type `B'
May others decide whether this will be fixed on the branch or not.
Btw, the error message got hosed with gcc 3.0.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class
[not found] <20030222194559.9807.frank6thursday@aol.com>
2003-08-05 14:55 ` [Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class reichelt at gcc dot gnu dot org
@ 2003-08-05 14:56 ` reichelt at gcc dot gnu dot org
2003-09-17 21:37 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-08-05 14:56 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9807
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.3.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class
[not found] <20030222194559.9807.frank6thursday@aol.com>
2003-08-05 14:55 ` [Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class reichelt at gcc dot gnu dot org
2003-08-05 14:56 ` reichelt at gcc dot gnu dot org
@ 2003-09-17 21:37 ` mmitchel at gcc dot gnu dot org
2003-11-03 20:07 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-09-17 21:37 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9807
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-09-17 21:00 -------
We will ever get around to fixing this slightly suboptimal error message on the
3.3. branch.
Therefore, I've closed this PR.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class
[not found] <20030222194559.9807.frank6thursday@aol.com>
` (2 preceding siblings ...)
2003-09-17 21:37 ` mmitchel at gcc dot gnu dot org
@ 2003-11-03 20:07 ` reichelt at gcc dot gnu dot org
2003-11-03 20:08 ` reichelt at gcc dot gnu dot org
2003-11-04 11:02 ` gdr at integrable-solutions dot net
5 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-11-03 20:07 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9807
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WONTFIX |
------- Additional Comments From reichelt at gcc dot gnu dot org 2003-11-03 20:07 -------
The diagnostic got magically fixed on the branch (before 3.3.2).
It now reads:
lall.cc:7: error: invalid type `B' for default argument to `A&'
lall.cc:9: error: invalid initialization of non-const reference of type 'A&'
from a temporary of type 'B'
lall.cc:7: error: in passing argument 1 of `C::C(A&)'
So I'm reopening the PR ...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class
[not found] <20030222194559.9807.frank6thursday@aol.com>
` (3 preceding siblings ...)
2003-11-03 20:07 ` reichelt at gcc dot gnu dot org
@ 2003-11-03 20:08 ` reichelt at gcc dot gnu dot org
2003-11-04 11:02 ` gdr at integrable-solutions dot net
5 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-11-03 20:08 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9807
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
------- Additional Comments From reichelt at gcc dot gnu dot org 2003-11-03 20:07 -------
... to close it as fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class
[not found] <20030222194559.9807.frank6thursday@aol.com>
` (4 preceding siblings ...)
2003-11-03 20:08 ` reichelt at gcc dot gnu dot org
@ 2003-11-04 11:02 ` gdr at integrable-solutions dot net
5 siblings, 0 replies; 6+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-11-04 11:02 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9807
------- Additional Comments From gdr at integrable-solutions dot net 2003-11-04 11:02 -------
Subject: Re: [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class
"reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| The diagnostic got magically fixed on the branch (before 3.3.2).
there is nothing magic about it. I believe it is the effect of
deliberate fix :-)
-- Gaby
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-11-04 11:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20030222194559.9807.frank6thursday@aol.com>
2003-08-05 14:55 ` [Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class reichelt at gcc dot gnu dot org
2003-08-05 14:56 ` reichelt at gcc dot gnu dot org
2003-09-17 21:37 ` mmitchel at gcc dot gnu dot org
2003-11-03 20:07 ` reichelt at gcc dot gnu dot org
2003-11-03 20:08 ` reichelt at gcc dot gnu dot org
2003-11-04 11:02 ` gdr at integrable-solutions dot net
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).