From: Jason Merrill Date: Wed, 13 Feb 2008 18:43:34 +0000 (-0500) Subject: re PR c++/34774 (templates, enumerations, overflow, ice) X-Git-Tag: prereleases/gcc-4.2.4-rc1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcf254c3a4e2be25eba9c4dce98ac5b128840c51;p=thirdparty%2Fgcc.git re PR c++/34774 (templates, enumerations, overflow, ice) PR c++/34774 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL of enumerators, too. From-SVN: r132292 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8069b3f5d594..85f19d70903f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-02-13 Jason Merrill + + PR c++/34774 + * pt.c (value_dependent_expression_p): Look into DECL_INITIAL + of enumerators, too. + 2008-02-12 Jason Merrill PR c++/34094 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 98adaec89a46..e459da26153a 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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