This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi!
This patch fixes the ICE part of PR36408. ({ }) is a STMT_EXPR with an empty STATEMENT_LIST inside of its BIND_EXPR_BODY. Ok for trunk/4.3?
The remaining problem is that there are no errors reported
for the int i = ({ }); when it is in template. That seems to be
because of
128000 dgregor tree t = RECUR (init);
128000 dgregor 128000 dgregor if (init && !t)
128000 dgregor /* If we had an initializer but it
128000 dgregor instantiated to nothing,
128000 dgregor value-initialize the object. This will
128000 dgregor only occur when the initializer was a
128000 dgregor pack expansion where the parameter packs
128000 dgregor used in that expansion were of length
128000 dgregor zero. */
128000 dgregor init = build_default_init (TREE_TYPE (decl),
128000 dgregor NULL_TREE);
128000 dgregor else
128000 dgregor init = t;
in tsubst_expr. Here init is an empty STATEMENT_LIST, for which RECUR is
NULL. The above code by assuming it has anything to do with parameter packs
will zero initialize the variable, but even init = NULL wouldn't help us,
only setting init to an empty STATEMENT_LIST or say build_empty_stmt ()
would help.
-- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |