This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13323] [3.3/3.4 regression] Template code does not compile in presence of typedef
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2003 21:12:52 -0000
- Subject: [Bug c++/13323] [3.3/3.4 regression] Template code does not compile in presence of typedef
- References: <20031205210149.13323.david.lee@teracruz.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2003-12-05 21:12 -------
This is clearly a bug, and a regression on 3.3/mainline w.r.t. 3.2.x.
Here's an extract:
-------------------------
template <class T> struct B {
virtual operator T() const = 0;
};
template <class T>
struct D : B<T> {
virtual operator T() const;
};
typedef int i;
typedef B<i> Bi;
D<int> i32;
---------------------------
g/x> /home/bangerth/bin/gcc-3.2.3/bin/c++ -c x.cc
g/x> /home/bangerth/bin/gcc-3.3.3-pre/bin/c++ -c x.cc
x.cc:13: error: cannot declare variable `i32' to be of type `D<int>'
x.cc:13: error: because the following virtual functions are abstract:
x.cc:2: error: B<T>::operator T() const [with T = i]
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2003-12-05 21:12:51
date| |
Summary|Template code does not |[3.3/3.4 regression]
|compile in presence of |Template code does not
|typedef |compile in presence of
| |typedef
Target Milestone|--- |3.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13323