diff options
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/explicit2.C | 10 |
4 files changed, 20 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e91e535..1d64a22 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 60ec069..8a76eac 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 100c0ed..363378c0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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. diff --git a/gcc/testsuite/g++.dg/template/explicit2.C b/gcc/testsuite/g++.dg/template/explicit2.C new file mode 100644 index 0000000..79941cd --- /dev/null +++ b/gcc/testsuite/g++.dg/template/explicit2.C @@ -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> (); |