From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106602 invoked by alias); 20 Oct 2015 16:14:32 -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 106472 invoked by uid 89); 20 Oct 2015 16:14:31 -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, 20 Oct 2015 16:14:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id AD57C8EA3A; Tue, 20 Oct 2015 16:14:27 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-75.phx2.redhat.com [10.3.113.75]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9KGERUS004085; Tue, 20 Oct 2015 12:14:27 -0400 Subject: Re: [PATCH 1/9] ENABLE_CHECKING refactoring To: Mikhail Maltsev , gcc-patches mailing list , Richard Biener References: <56130763.4070206@gmail.com> <561D7899.9080401@redhat.com> <5623398D.7040809@gmail.com> From: Jeff Law Message-ID: <56266863.4010101@redhat.com> Date: Tue, 20 Oct 2015 16:14: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: <5623398D.7040809@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg01908.txt.bz2 On 10/18/2015 12:17 AM, Mikhail Maltsev wrote: > On 10/12/2015 11:57 PM, Jeff Law wrote: >>>> -#ifdef ENABLE_CHECKING >>>> +#if CHECKING_P >>> >>> I fail to see the point of this change. >> I'm guessing (and Mikhail, please correct me if I'm wrong), but I think he's >> trying to get away from ENABLE_CHECKING and instead use a macro which is >> always defined to a value. > Yes, exactly. Such macro is better because it can be used both for conditional > compilation (if needed) and normal if-s (unlike ENABLE_CHECKING). > > On 10/14/2015 12:33 AM, Jeff Law wrote: >>> gcc/common.opt | 5 +++++ >>> gcc/system.h | 3 +++ >>> libcpp/system.h | 8 ++++++++ >>> 3 files changed, 16 insertions(+) >> I committed this prerequisite patch to the trunk. >> >> jeff >> > > There is a typo here: > >> #ifdef ENABLE_CHECKING >> #define gcc_checking_assert(EXPR) gcc_assert (EXPR) >> +#define CHECKING_P 1 >> #else >> +/* N.B.: in release build EXPR is not evaluated. */ >> #define gcc_checking_assert(EXPR) ((void)(0 && (EXPR))) >> +#define CHECKING_P 1 >> #endif > > In my original patch the second definition actually was > '+#define CHECKING_P 0' Not sure how that happened. I'll take care of it. I'd actually planned to start extracting the non-controversial stuff out of the later patches, but just ran out of time before going onto PTO. > > Also, gcc_checking_assert in libcpp requires gcc_assert to be defined. That was > missing in my original patch (and was added in patch 2/9), but I think it would > be better to fix it here, as Bernd noticed (in the last paragraph of [1]). Sounds wise. Agreed. > > Besides, I like Richard's proposal [2] about moving CHECKING_P macros into > configure.ac. > > [1] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00550.html > [2] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00555.html > > It required minor tweaking in order to silence autotools' warnings. I attached > the modified patch. When I tried that, I couldn't get it to work. My autotools-fu is quite limited. > > OK for trunk (after bootstrap/regtest)? I'll take a closer look later today, after my morning meetings. > > P.S. I am planning to post at least some of the other updated parts today, and I > also hope to get in time with the whole series (before stage1 ends). Excellent. jeff