Commit 3387721b by Jason Merrill Committed by Jason Merrill

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: r132283
parent 156d614f
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> 2008-02-12 Jason Merrill <jason@redhat.com>
PR c++/34824 PR c++/34824
......
...@@ -15638,7 +15638,7 @@ value_dependent_expression_p (tree expression) ...@@ -15638,7 +15638,7 @@ value_dependent_expression_p (tree expression)
/* A non-type template parm. */ /* A non-type template parm. */
if (DECL_TEMPLATE_PARM_P (expression)) if (DECL_TEMPLATE_PARM_P (expression))
return true; return true;
return false; return value_dependent_expression_p (DECL_INITIAL (expression));
case VAR_DECL: case VAR_DECL:
/* A constant with integral or enumeration type and is initialized /* A constant with integral or enumeration type and is initialized
......
// PR c++/34774
template<int shifts>
struct shift {
enum {
n0 = (unsigned)shifts,
n = n0 ? 0 : n0,
n_comp = -n
} x;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment