From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80111 invoked by alias); 28 Apr 2015 23:55:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 80097 invoked by uid 89); 28 Apr 2015 23:55:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 28 Apr 2015 23:55:36 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3SNtZZS005989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 28 Apr 2015 19:55:35 -0400 Received: from localhost.localdomain (ovpn-113-143.phx2.redhat.com [10.3.113.143]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3SNtYar019041; Tue, 28 Apr 2015 19:55:35 -0400 Message-ID: <55401DF6.4080400@redhat.com> Date: Wed, 29 Apr 2015 00:25:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: David Malcolm , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 3/3] Fix indentation issues seen by -Wmisleading-indentation References: <5536936F.8090004@gmail.com> <1430265776-8157-1-git-send-email-dmalcolm@redhat.com> <1430265776-8157-3-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1430265776-8157-3-git-send-email-dmalcolm@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01811.txt.bz2 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