Commit 0161fcff by Jason Merrill Committed by Jason Merrill

re PR c++/23357 (ICE with __alignof__ on template arguments)

        PR c++/23357
        * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
        tcc_expression.

From-SVN: r104340
parent 07af06f6
2005-09-15 Jason Merrill <jason@redhat.com>
PR c++/23357
* cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
tcc_expression.
2005-09-15 Mark Mitchell <mark@codesourcery.com>
PR c++/23896
......
......@@ -324,14 +324,14 @@ DEFTREECODE (TINST_LEVEL, "TINST_LEVEL", tcc_exceptional, 0)
DEFTREECODE (OFFSETOF_EXPR, "offsetof_expr", tcc_expression, 1)
/* Represents a 'sizeof' expression during template expansion. */
DEFTREECODE (SIZEOF_EXPR, "sizeof_expr", tcc_unary, 1)
DEFTREECODE (SIZEOF_EXPR, "sizeof_expr", tcc_expression, 1)
/* Represents the -> operator during template expansion. */
DEFTREECODE (ARROW_EXPR, "arrow_expr", tcc_expression, 1)
/* Represents an '__alignof__' expression during template
expansion. */
DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", tcc_unary, 1)
DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", tcc_expression, 1)
/* A STMT_EXPR represents a statement-expression during template
expansion. This is the GCC extension { ( ... ) }. The
......
// PR c++/23357
template<typename T> bool foo()
{
const long int i = sizeof(T) > 1 ? sizeof(T) : 0;
return i > 0;
}
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