This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11987] [3.4/3.5 regression] Accepts-invalid with inherited nested type
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2004 14:06:35 -0000
- Subject: [Bug c++/11987] [3.4/3.5 regression] Accepts-invalid with inherited nested type
- References: <20030819225102.11987.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-02-03 14:06 -------
Wolfgang, I'm revisiting this bug.
Y<dim>::I is a typedef for X<dim>::I. The standard does not explicitally
forbids the use of typedef-names as qualifying scope in a constructor
definition, and they are generally allowed for member functions. For instance,
the following is trivially valid:
struct C { C(); };
typedef C D;
D::C() {}
The only limitation I see is [comp.ctor]/3, which says that "a typedef-name
that names a class shall not be used as the identifier in the declarator for a
constructor declaration." but it is referring to the identifier itself, not to
the qualified-id.
Do you agree?
I'm positive that your testcase is indeed valid.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovannibajo at libero dot
| |it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11987