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]

Re: c++/9476: lookup of member in base class template fails


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9476

You (Nathan) said that `the usual' lookup rules apply here. In these words I 
read that within D<X> the data member i could be found in the base class 
B<X>, according to 3.4.1/7.

In fact, I believed that the requirement that `specializations of templates 
are known before first use of the template' was exactly to make code like 
this have a clear meaning, independent of the presence of specialisations of 
the base class. (Otherwise, a specialisation B<double> could re-define the 
type of i.)

In your mail you also say that `the koenig lookup should be resolved at parse 
time. (see example in 14.6/9)'. Well, in the code in my report a definition 
of `int i' is present in the base class which is seen at parse time, so what 
is the problem? The example in 14.6.9 is different: there the line `d++' 
refers to a d that is not there (yet). It is declared a few lines lower.

As a sidenote: earlier today a similar report has been posted (9447). It may 
be taken into acount in this discusssion. In the audit trail of that PR, 
Paolo Carlini expresses his belief that these _are_ parser bugs, BTW. Also 
Gabriel Dos Reis seems to be certain that the present behaviour is not 
correct (mailing list, today). 

Hmmm. Clash of the Titans. I'm going to watch and be curious about the outcome 
of the discussion.

	Regards, Jan.

-- 
Keio-Tsuushin Residence
Jan van Dijk, Room 210
2 Chome 19-30, Mita Minato-ku
108 Tokyo, Japan

jan@etpmod.phys.tue.nl
tel: +81 3 5476 9461 (home)
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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