This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11987] [3.4/3.5 regression] Accepts-invalid with inherited nested type


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]