From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114861 invoked by alias); 27 Oct 2015 17:53:47 -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 114849 invoked by uid 89); 27 Oct 2015 17:53:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS 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, 27 Oct 2015 17:53:42 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 10BEFC0B5902; Tue, 27 Oct 2015 17:53:41 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-196.phx2.redhat.com [10.3.113.196]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9RHre2I026351; Tue, 27 Oct 2015 13:53:40 -0400 Subject: Re: [PATCH] Add -fchecking To: Mikhail Maltsev , Richard Biener , gcc-patches@gcc.gnu.org References: <562F98F9.20206@gmail.com> From: Jeff Law Message-ID: <562FBA24.2080407@redhat.com> Date: Tue, 27 Oct 2015 18:06:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <562F98F9.20206@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg02939.txt.bz2 On 10/27/2015 09:32 AM, Mikhail Maltsev wrote: > On 10/27/2015 04:17 PM, Richard Biener wrote: >> >> This adds -fchecking as a way to enable internal consistency checks >> even in release builds (or disable checking with -fno-checking - up to >> a certain extent - with checking enabled). > > I remember that Jakub proposed to use __builtin_expect with > flag_checking. I wonder, if it is possible to implement without hacking > AWK scripts just for this particular case? For example, to define > flag_checking to something like > > #define flag_checking __builtin_expect (flag_checking_val, CHECKING_P) > > (provided that flag_checking_val is the actual value got from > command-line options). I think this ought to be a follow-up item. And yes, we're going to need some level of indirection so that we're not writing __builtin_expect all over the place. Jeff