public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34364] New: [4.1/4.2/4.3] class& is not known as as a class-type anymore after dynamic_cast
@ 2007-12-06 19:53 rbuergel at web dot de
2007-12-08 20:23 ` [Bug c++/34364] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: rbuergel at web dot de @ 2007-12-06 19:53 UTC (permalink / raw)
To: gcc-bugs
The following code fails to compile
struct A {
virtual ~A() {}; //make A polymorphic
};
struct B: public A
{
template <typename T2>
class C
{
public:
static void f (A& a)
{
dynamic_cast<B&>( a ).g();
}
};
void g () {}
};
... and issues the following Error message:
test.cpp: In static member function 'static void B::Update<T2>::g(A&)':
test.cpp:21: error: request for member 'g' in 'dynamic_cast<B&>(a)', which is
of non-class type 'B&'
On the other hand, it works if either C is not a template or B is a template.
this fails for 4.1.3, 4.2.2 and 4.3.0
--
Summary: [4.1/4.2/4.3] class& is not known as as a class-type
anymore after dynamic_cast
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rbuergel at web dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34364
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34364] [4.1/4.2/4.3 Regression] class& is not known as as a class-type anymore after dynamic_cast
2007-12-06 19:53 [Bug c++/34364] New: [4.1/4.2/4.3] class& is not known as as a class-type anymore after dynamic_cast rbuergel at web dot de
@ 2007-12-08 20:23 ` pinskia at gcc dot gnu dot org
2007-12-10 22:20 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-08 20:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-12-08 20:23 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Known to fail| |4.1.1 4.1.2 4.2.0 4.3.0
Known to work| |4.0.2
Last reconfirmed|0000-00-00 00:00:00 |2007-12-08 20:23:26
date| |
Summary|[4.1/4.2/4.3] class& is not |[4.1/4.2/4.3 Regression]
|known as as a class-type |class& is not known as as a
|anymore after dynamic_cast |class-type anymore after
| |dynamic_cast
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34364
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34364] [4.1/4.2/4.3 Regression] class& is not known as as a class-type anymore after dynamic_cast
2007-12-06 19:53 [Bug c++/34364] New: [4.1/4.2/4.3] class& is not known as as a class-type anymore after dynamic_cast rbuergel at web dot de
2007-12-08 20:23 ` [Bug c++/34364] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-12-10 22:20 ` jakub at gcc dot gnu dot org
2007-12-11 8:20 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-12-10 22:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2007-12-10 22:19 -------
Testing a fix.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2007-12-08 20:23:26 |2007-12-10 22:19:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34364
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34364] [4.1/4.2/4.3 Regression] class& is not known as as a class-type anymore after dynamic_cast
2007-12-06 19:53 [Bug c++/34364] New: [4.1/4.2/4.3] class& is not known as as a class-type anymore after dynamic_cast rbuergel at web dot de
2007-12-08 20:23 ` [Bug c++/34364] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-12-10 22:20 ` jakub at gcc dot gnu dot org
@ 2007-12-11 8:20 ` jakub at gcc dot gnu dot org
2007-12-11 8:37 ` [Bug c++/34364] [4.1/4.2 " jakub at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-12-11 8:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2007-12-11 08:20 -------
Subject: Bug 34364
Author: jakub
Date: Tue Dec 11 08:20:15 2007
New Revision: 130770
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130770
Log:
PR c++/34364
* rtti.c (build_dynamic_cast): Call convert_from_reference even for
dynamic_cast in a template.
* g++.dg/rtti/dyncast2.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/rtti/dyncast2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/rtti.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34364
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34364] [4.1/4.2 Regression] class& is not known as as a class-type anymore after dynamic_cast
2007-12-06 19:53 [Bug c++/34364] New: [4.1/4.2/4.3] class& is not known as as a class-type anymore after dynamic_cast rbuergel at web dot de
` (2 preceding siblings ...)
2007-12-11 8:20 ` jakub at gcc dot gnu dot org
@ 2007-12-11 8:37 ` jakub at gcc dot gnu dot org
2008-07-04 22:22 ` [Bug c++/34364] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-31 1:39 ` jsm28 at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-12-11 8:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2007-12-11 08:37 -------
Fixed on the trunk.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.1.1 4.1.2 4.2.0 4.3.0 |4.1.1 4.1.2 4.2.0
Known to work|4.0.2 |4.0.2 4.3.0
Summary|[4.1/4.2/4.3 Regression] |[4.1/4.2 Regression] class&
|class& is not known as as a |is not known as as a class-
|class-type anymore after |type anymore after
|dynamic_cast |dynamic_cast
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34364
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34364] [4.2 Regression] class& is not known as as a class-type anymore after dynamic_cast
2007-12-06 19:53 [Bug c++/34364] New: [4.1/4.2/4.3] class& is not known as as a class-type anymore after dynamic_cast rbuergel at web dot de
` (3 preceding siblings ...)
2007-12-11 8:37 ` [Bug c++/34364] [4.1/4.2 " jakub at gcc dot gnu dot org
@ 2008-07-04 22:22 ` jsm28 at gcc dot gnu dot org
2009-03-31 1:39 ` jsm28 at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 22:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jsm28 at gcc dot gnu dot org 2008-07-04 22:21 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.1/4.2 Regression] class& |[4.2 Regression] class& is
|is not known as as a class- |not known as as a class-type
|type anymore after |anymore after dynamic_cast
|dynamic_cast |
Target Milestone|4.1.3 |4.2.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34364
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34364] [4.2 Regression] class& is not known as as a class-type anymore after dynamic_cast
2007-12-06 19:53 [Bug c++/34364] New: [4.1/4.2/4.3] class& is not known as as a class-type anymore after dynamic_cast rbuergel at web dot de
` (4 preceding siblings ...)
2008-07-04 22:22 ` [Bug c++/34364] [4.2 " jsm28 at gcc dot gnu dot org
@ 2009-03-31 1:39 ` jsm28 at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 1:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jsm28 at gcc dot gnu dot org 2009-03-31 01:39 -------
Closing 4.2 branch, fixed in 4.3.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|4.1.1 4.1.2 4.2.0 |4.1.1 4.1.2 4.2.0 4.2.5
Resolution| |FIXED
Target Milestone|4.2.5 |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34364
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-03-31 1:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-06 19:53 [Bug c++/34364] New: [4.1/4.2/4.3] class& is not known as as a class-type anymore after dynamic_cast rbuergel at web dot de
2007-12-08 20:23 ` [Bug c++/34364] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-12-10 22:20 ` jakub at gcc dot gnu dot org
2007-12-11 8:20 ` jakub at gcc dot gnu dot org
2007-12-11 8:37 ` [Bug c++/34364] [4.1/4.2 " jakub at gcc dot gnu dot org
2008-07-04 22:22 ` [Bug c++/34364] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-31 1:39 ` jsm28 at gcc dot gnu dot org
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).