This is the mail archive of the gcc-patches@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] |
And another backport to the 3.4 branch fresh out of the regression tester: Bootstrapped and regtested on i686-pc-linux-gnu. Ok for the 3.4 branch? Regards, Volker 2005-09-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de> Backport: 2005-08-26 Mark Mitchell <mark@codesourcery.com> PR c++/19004 * pt.c (uses_template_parms): Handle IDENTIFIER_NODE. (type_dependent_expression_p): Allow BASELINKs whose associated functions are simply a FUNCTION_DECL. =================================================================== --- gcc/gcc/cp/pt.c 28 Jul 2005 10:22:15 -0000 1.816.2.57 +++ gcc/gcc/cp/pt.c 2 Sep 2005 11:52:09 -0000 @@ -4809,6 +4809,7 @@ uses_template_parms (tree t) || TREE_CODE (t) == TEMPLATE_PARM_INDEX || TREE_CODE (t) == OVERLOAD || TREE_CODE (t) == BASELINK + || TREE_CODE (t) == IDENTIFIER_NODE || TREE_CODE_CLASS (TREE_CODE (t)) == 'c') dependent_p = (type_dependent_expression_p (t) || value_dependent_expression_p (t)); @@ -12027,7 +12028,8 @@ type_dependent_expression_p (tree expres return true; expression = TREE_OPERAND (expression, 0); } - if (TREE_CODE (expression) == OVERLOAD) + if (TREE_CODE (expression) == OVERLOAD + || TREE_CODE (expression) == FUNCTION_DECL); { while (expression) { =================================================================== 2005-09-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de> Backport: 2005-08-26 Mark Mitchell <mark@codesourcery.com> PR c++/19004 * g++.dg/template/nontype13.C: New test. =================================================================== --- gcc/gcc/testsuite/g++.dg/template/nontype13.C +++ gcc/gcc/testsuite/g++.dg/template/nontype13.C 2005-09-02 11:48:42 +0000 @@ -0,0 +1,29 @@ +// PR c++/19004 + +template<typename T> +struct Dummy +{ + void evil() + { + this->template tester<true>(); + } + + template<bool B> + void tester() + { + bar<evil>()(); // { dg-error "argument" } + } + template<bool B> + struct bar + { + void operator()() + { } + }; +}; + +int main() +{ + Dummy<int> d; + d.tester<true> (); // { dg-error "instantiated" } +} + ===================================================================
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |