tree else_cl = COND_EXPR_ELSE (old_expr);
if (!VOID_TYPE_P (TREE_TYPE (else_cl)))
{
- gcc_checking_assert (TREE_CODE (then_cl) != STATEMENT_LIST);
+ gcc_checking_assert (TREE_CODE (else_cl) != STATEMENT_LIST);
else_cl
= build2 (init_expr ? INIT_EXPR : MODIFY_EXPR, var_type,
var, else_cl);
continue_:
if (base_binfo)
{
- BINFO_BASE_ITERATE (binfo, ++binfo_idx, base_binfo);
- if (base_binfo)
+ if (BINFO_BASE_ITERATE (binfo, ++binfo_idx, base_binfo))
field = base_binfo;
else
field = next_initializable_field (TYPE_FIELDS (type));
function_depth++; /* Prevent unexpected GCs. */
- if (counts[MSC_entities] != entity_num)
+ if (ok && counts[MSC_entities] != entity_num)
ok = false;
if (ok && counts[MSC_entities]
&& !read_entities (counts[MSC_entities],
static tree
build_range_temp (tree range_expr)
{
- tree range_type, range_temp;
-
/* Find out the type deduced by the declaration
`auto &&__range = range_expr'. */
- range_type = cp_build_reference_type (make_auto (), true);
- range_type = do_auto_deduction (range_type, range_expr,
- type_uses_auto (range_type));
+ tree auto_node = make_auto ();
+ tree range_type = cp_build_reference_type (auto_node, true);
+ range_type = do_auto_deduction (range_type, range_expr, auto_node);
/* Create the __range variable. */
- range_temp = build_decl (input_location, VAR_DECL, for_range__identifier,
- range_type);
+ tree range_temp = build_decl (input_location, VAR_DECL,
+ for_range__identifier, range_type);
TREE_USED (range_temp) = 1;
DECL_ARTIFICIAL (range_temp) = 1;
so that maybe_instantiate_noexcept can tsubst the NOEXCEPT_EXPR
in the pattern. */
for (tree i : DEFPARSE_INSTANTIATIONS (def_parse))
- DEFERRED_NOEXCEPT_PATTERN (TREE_PURPOSE (i)) = TREE_PURPOSE (spec);
+ DEFERRED_NOEXCEPT_PATTERN (TREE_PURPOSE (i))
+ = spec ? TREE_PURPOSE (spec) : error_mark_node;
/* Restore the state of local_variables_forbidden_p. */
parser->local_variables_forbidden_p = local_variables_forbidden_p;