]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/34774 (templates, enumerations, overflow, ice)
authorJason Merrill <jason@redhat.com>
Wed, 13 Feb 2008 18:43:34 +0000 (13:43 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 13 Feb 2008 18:43:34 +0000 (13:43 -0500)
        PR c++/34774
        * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
        of enumerators, too.

From-SVN: r132292

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

index 8069b3f5d594f45eaf0012d721235dea6419ac40..85f19d70903f6a3d319195d5d761ac8096edd935 100644 (file)
@@ -1,3 +1,9 @@
+2008-02-13  Jason Merrill  <jason@redhat.com>
+
+       PR c++/34774
+       * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
+       of enumerators, too.
+
 2008-02-12  Jason Merrill  <jason@redhat.com>
 
        PR c++/34094
index 98adaec89a46a010b1e8f32c817e16734a64a1db..e459da26153a57edfadf02ee9f0877bb7537bb8f 100644 (file)
@@ -12944,7 +12944,7 @@ value_dependent_expression_p (tree expression)
       /* A non-type template parm.  */
       if (DECL_TEMPLATE_PARM_P (expression))
        return true;
-      return false;
+      return value_dependent_expression_p (DECL_INITIAL (expression));
 
     case VAR_DECL:
        /* A constant with integral or enumeration type and is initialized