On 04/28/2015 06:02 PM, David Malcolm wrote:
This patch fixes the places in our tree where -Wmisleading-indentation
correctly identifies code that's misleadingly indented.

In particular, a couple of places in
   gcc/cp/parser.c:cp_parser_asm_definition
appeared to be missing braces, both of the form:

   if (complicated_multiline_condition ())
     some_var_not_otherwise_set = some_value ();

     if (some_var_not_otherwise_set == error_mark_node)
        some_flag = true;

where the second "if" is misleadingly indented as if guarded by
the first.  Given the logic, it was clear that these ought to have
been so guarded, so I changed these to read:

  if (complicated_multiline_condition ())
    {
      some_var_not_otherwise_set = some_value ();

      if (some_var_not_otherwise_set == error_mark_node)
        some_flag = true;
    }

gcc/ChangeLog:
        * auto-profile.c (afdo_find_equiv_class): Fix indentation so
        that it reflects the block structure.
        (afdo_propagate_edge): Likewise.
        (afdo_calculate_branch_prob): Likewise.
        (afdo_annotate_cfg): Likewise.
        * cfgcleanup.c (equal_different_set_p): Likewise.
        (try_crossjump_to_edge): Likewise.
        * cgraph.c (cgraph_node::verify_node): Likewise.
        * cgraphunit.c (expand_all_functions): Likewise.
        * config/i386/i386.c (ix86_expand_copysign): Likewise.
        (exact_dependency_1): Likewise.
        * dwarf2asm.c (dw2_output_indirect_constants): Likewise.
        * dwarf2out.c (tree_add_const_value_attribute_for_decl): Likewise.
        * gensupport.c (process_define_subst): Likewise.
        * lto-wrapper.c (merge_and_complain): Likewise.
        * tree-if-conv.c (if_convertible_bb_p): Likewise.
        * tree-ssa-loop-prefetch.c (find_or_create_group): Likewise.
        * tree-ssa-tail-merge.c (gsi_advance_fw_nondebug_nonlocal): Likewise.
        * tree-vect-data-refs.c (vect_grouped_load_supported): Likewise.
        * tree-vect-loop.c (vectorizable_reduction): Likewise.
        * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
        * tree-vect-stmts.c (vectorizable_shift): Likewise.
        * tree-vrp.c (vrp_finalize): Likewise.
        * tree.c (variably_modified_type_p): Likewise.

gcc/cp/ChangeLog:
        * parser.c (cp_parser_asm_definition): Only test for
         error_mark_node if "outputs" was just set.
        (cp_parser_asm_definition): Likewise for "inputs".

gcc/fortran/ChangeLog:
        * expr.c (check_inquiry): Fix indentation so that it reflects the
        block structure.
        * interface.c (compare_parameter): Likewise.
        * parse.c (parse_oacc_structured_block): Likewise.
        * target-memory.c (expr_to_char): Likewise.
        * trans-types.c (gfc_init_kinds): Likewise.

libcpp/ChangeLog:
        * pch.c (cpp_valid_state): Fix indentation so that it reflects the
        block structure.
OK.
jeff

Reply via email to