From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 114573857829 for ; Sun, 28 Nov 2021 19:19:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 114573857829 Received: by mail-pj1-x1033.google.com with SMTP id gt5so10834745pjb.1 for ; Sun, 28 Nov 2021 11:19:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=qXH5p3Pvvnm3u0W8lVHfpSzIB5uN2y11/sVJXwAsP5Q=; b=GabWYsLzZs+ktem7X3uiers9UdglbxT2PlThBAAm9qi4DFZ2dpWXW4cs2Yj9izgvi2 RZhqOwtbHCM+TByURddgtczSKHxyvwXRL/+9dGDDAnhtjSjDegmOZ+PGhDZXXChKchcE wL2U29vWMAC9aWftXXI/IFn/npPYxOxJ6knbnhEQh+bOdJQcABCRLk3ZbhBygcn82h8H xnFgi5fMkEng7QZ/Rs/NCoaHR4CgAIcf4l6pvPF8lXvB+V9xOFEblNPoQU2BMZQ5R7zw f8uAhEFM00dkPHr0awCrJGgwF7G5I8ilIqXatRVkQjWUjjUB7WOpILRK/9MRbUlVk5SW vuwA== X-Gm-Message-State: AOAM532ONS6OPzSdZ8GNOKBQEfIx7Jn22tv7z/fqRIk7Pb+ughUXeoSG zzRxuYzEJIk8G9uamoYmPhE= X-Google-Smtp-Source: ABdhPJwwxy4PlxuB/jUEk2cYk6eqU4/LGf+fvZSY6F6xuJMIlOeciGM4dPoFYhBXDGIk8/VpDArRqA== X-Received: by 2002:a17:902:aa86:b0:145:90c:f4aa with SMTP id d6-20020a170902aa8600b00145090cf4aamr54130269plr.79.1638127146089; Sun, 28 Nov 2021 11:19:06 -0800 (PST) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id d3sm14515109pfv.57.2021.11.28.11.19.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Nov 2021 11:19:05 -0800 (PST) Message-ID: <08176a9d-ac1a-123d-9466-9c2040a5f2ef@gmail.com> Date: Sun, 28 Nov 2021 12:19:04 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] Remove unreachable returns Content-Language: en-US To: Richard Biener , gcc-patches@gcc.gnu.org Cc: polacek@redhat.com References: <80qqs862-prn1-369p-94n4-qq8qoq34os1@fhfr.qr> From: Jeff Law In-Reply-To: <80qqs862-prn1-369p-94n4-qq8qoq34os1@fhfr.qr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2021 19:19:08 -0000 On 11/25/2021 7:16 AM, Richard Biener via Gcc-patches wrote: > This removes unreachable return statements as diagnosed by > the -Wunreachable-code patch. Some cases are more obviously > an improvement than others - in fact some may get you the idea > to replace them with gcc_unreachable () instead, leading to > cases of the 'Remove unreachable gcc_unreachable () at the end > of functions' patch. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > OK? Comments? Feel free to approve select cases only. > > Thanks, > Richard. > > 2021-11-25 Richard Biener > > * vec.c (qsort_chk): Do not return the void return value > from the noreturn qsort_chk_error. > * ccmp.c (expand_ccmp_expr_1): Remove unreachable return. > * df-scan.c (df_ref_equal_p): Likewise. > * dwarf2out.c (is_base_type): Likewise. > (add_const_value_attribute): Likewise. > * fixed-value.c (fixed_arithmetic): Likewise. > * gimple-fold.c (gimple_fold_builtin_fputs): Likewise. > * gimple-ssa-strength-reduction.c (stmt_cost): Likewise. > * graphite-isl-ast-to-gimple.c > (gcc_expression_from_isl_expr_op): Likewise. > (gcc_expression_from_isl_expression): Likewise. > * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): > Likewise. > * lto-streamer-in.c (lto_input_mode_table): Likewise. > > gcc/c-family/ > * c-opts.c (c_common_post_options): Remove unreachable return. > * c-pragma.c (handle_pragma_target): Likewise. > (handle_pragma_optimize): Likewise. > > gcc/c/ > * c-typeck.c (c_tree_equal): Remove unreachable return. > * c-parser.c (get_matching_symbol): Likewise. > > libgomp/ > * oacc-plugin.c (GOMP_PLUGIN_acc_default_dim): Remove unreachable > return. I'd commit the whole set. jeff