]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Sat, 3 Sep 2005 19:53:01 +0000 (19:53 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Sat, 3 Sep 2005 19:53:01 +0000 (19:53 +0000)
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.

* g++.dg/template/nontype13.C: New test.

From-SVN: r103815

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog

index 6e489b59743001d65255a848737a3e1098d3a008..bc4cfb3a82ac9ed9ed37e422c8ffaac4b13b046b 100644 (file)
@@ -1,3 +1,13 @@
+2005-09-03  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.
+
 2005-09-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/22233
index 0db01ee65345bb1d348dde270b3af717e709c2a2..5fcbf300f51cdef59b6c82eb3472fa45d653b329 100644 (file)
@@ -4810,6 +4810,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));
@@ -12028,7 +12029,8 @@ type_dependent_expression_p (tree expression)
            return true;
          expression = TREE_OPERAND (expression, 0);
        }
-      if (TREE_CODE (expression) == OVERLOAD)
+      if (TREE_CODE (expression) == OVERLOAD
+         || TREE_CODE (expression) == FUNCTION_DECL)
        {
          while (expression)
            {
index c1e664f64ce17c3d91186a13985de71daf83ebb4..092acae2ff3c6c8e6420c06f0f904889da55ffce 100644 (file)
@@ -1,3 +1,11 @@
+2005-09-03  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.
+
 2005-09-02  Richard Sandiford  <richard@codesourcery.com>
 
        PR c/22061