From patchwork Wed Nov 9 03:13:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sebor X-Patchwork-Id: 81429 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1879774qge; Tue, 8 Nov 2016 19:13:37 -0800 (PST) X-Received: by 10.98.15.206 with SMTP id 75mr29308681pfp.105.1478661217850; Tue, 08 Nov 2016 19:13:37 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id d185si39761047pfg.195.2016.11.08.19.13.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Nov 2016 19:13:37 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-440799-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-440799-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-440799-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=LiHm4gb/p1sBfny8zYamX1pgthdVqKI3JpuIRm8umNW/CzMIv7gb3 zeYJRS0K1Ix8wZPyQV6kL4kFayttUl5bebnv8T/e9ZDXW9Ob1DvPfaPeM6mCT2Wd tMG9tOfAqpRP5Q5vo7Px/cOyHQU2jM1+Dg4EfMYSdbzO/fDS478PYI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=UjcjZQY/Te8q6OgfScuILT/Gdoc=; b=FajjgJaSbzD2w4yORTyO 9ja/nc+1Oan9YcCbDyofcMed2dl98R+Rr3sLFXSu95i8PML8Dzcv0pf72TjrzvcC 2AZpYxwIG+Mx7IAsTYhbi87AsuYXTmD+QN9pWWsHG8qstu/xdmejPxx0Z/BE54NI H+GadW4u9OfIdOE32x0MSrE= Received: (qmail 49200 invoked by alias); 9 Nov 2016 03:13:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 49178 invoked by uid 89); 9 Nov 2016 03:13:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f182.google.com Received: from mail-qt0-f182.google.com (HELO mail-qt0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Nov 2016 03:13:21 +0000 Received: by mail-qt0-f182.google.com with SMTP id p16so119476896qta.0 for ; Tue, 08 Nov 2016 19:13:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version; bh=Q5Hh/hFW/e7glypoYgLpqPuHKbMWkCDobBKBbrSEweM=; b=BgSjcHYrjeMw5Uj37UlQfq4kflBJvn8rM7OEtpRYdy0UuWdUn5NPzuHDVXknwzpc2J qbGX4G9IYyvv3lBEp/o6JD753ZXl9UMmW+gI9OQTq0x4dDSwKSHqn6W4PF11o6ua6FKm I3gSE+4zrAC+kOCFYDf67Fd+D7adXgBACbzTJTJpOfqWzi1pzUna9HGRHsyF0rNOBeEo Z2zSl9Vor85Po6KDGpZy1hTU2CyDgHp2PYdsiaLJGiySPIG14phEhjNdIKy/a65gVP2Q YbFfsxgbk0pEB0qyU/JB7yYz6O4rx5tybvbC+T8Q2g9C2mBEcZq/fsjTkeoYS71mQzXs OunQ== X-Gm-Message-State: ABUngvdO5CCl7c4vFQzW8B4a+9iaMJFVfI8oBGG1Lu5Y7ZkuSUa8MFJFUw7NGthIQS4AIg== X-Received: by 10.200.55.69 with SMTP id p5mr16108046qtb.67.1478661200288; Tue, 08 Nov 2016 19:13:20 -0800 (PST) Received: from [192.168.0.26] (75-166-206-79.hlrn.qwest.net. [75.166.206.79]) by smtp.gmail.com with ESMTPSA id q21sm21199667qkq.8.2016.11.08.19.13.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Nov 2016 19:13:19 -0800 (PST) From: Martin Sebor Subject: [PATCH] enable -fprintf-return-value by default To: Gcc Patch List Message-ID: <1e7776ca-c7f6-4d93-6b33-2c51dc5a8689@gmail.com> Date: Tue, 8 Nov 2016 20:13:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 X-IsSubscribed: yes The -fprintf-return-value optimization has been disabled since the last time it caused a bootstrap failure on powerpc64le. With the underlying problems fixed GCC has bootstrapped fine on all of powerpc64, powerpc64le and x86_64 and tested with no regressions. I'd like to re-enable the option. The attached patch does that. Thanks Martin gcc/c-family/ChangeLog: * c.opt (-fprintf-return-value): Enable by default. gcc/ChangeLog: * doc/invoke.texi (-fprintf-return-value): Document that option is enabled by default. diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 7d8a726..9c9e83f 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1534,7 +1534,7 @@ C++ ObjC++ Var(flag_pretty_templates) Init(1) -fno-pretty-templates Do not pretty-print template specializations as the template signature followed by the arguments. fprintf-return-value -C ObjC C++ ObjC++ LTO Optimization Var(flag_printf_return_value) Init(0) +C ObjC C++ ObjC++ LTO Optimization Var(flag_printf_return_value) Init(1) Treat known sprintf return values as constants. freplace-objc-classes diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 17c5c22..adebeff 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -8301,7 +8301,7 @@ if (snprintf (buf, "%08x", i) >= sizeof buf) The @option{-fprintf-return-value} option relies on other optimizations and yields best results with @option{-O2}. It works in tandem with the @option{-Wformat-length} option. The @option{-fprintf-return-value} -option is disabled by default. +option is enabled by default. @item -fno-peephole @itemx -fno-peephole2