re PR c++/9411 ([New parser] Template function lookup problem)

PR c++/9411
	* parser.c (cp_parser_postfix_expression): Check dependency of
	functions.

	PR c++/9411
	* g++.dg/template/explicit2.C: New test.

From-SVN: r69196
This commit is contained in:
Mark Mitchell 2003-07-10 19:19:09 +00:00 committed by Mark Mitchell
parent a9189cc05f
commit 584672eef4
4 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2003-07-10 Mark Mitchell <mark@codesourcery.com>
PR c++/9411
* parser.c (cp_parser_postfix_expression): Check dependency of
functions.
2003-07-09 Mark Mitchell <mark@codesourcery.com>
PR c++/10032

View File

@ -3846,6 +3846,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p)
&& (type_dependent_expression_p (instance)
|| (!BASELINK_P (fn)
&& TREE_CODE (fn) != FIELD_DECL)
|| type_dependent_expression_p (fn)
|| any_type_dependent_arguments_p (args)))
{
postfix_expression

View File

@ -1,5 +1,8 @@
2003-07-10 Mark Mitchell <mark@codesourcery.com>
PR c++/9411
* g++.dg/template/explicit2.C: New test.
PR c++/10032
* g++.dg/warn/pedantic1.C: New test.

View File

@ -0,0 +1,10 @@
struct X {
template <class B> void foo(B);
};
template <class D>
void bar() {
X().foo<D>(1);
}
template void bar<int> ();