From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71877 invoked by alias); 30 Jun 2015 10:51:55 -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 71864 invoked by uid 89); 30 Jun 2015 10:51:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Jun 2015 10:51:53 +0000 Received: from svr-orw-fem-05.mgc.mentorg.com ([147.34.97.43]) by relay1.mentorg.com with esmtp id 1Z9t8l-0001Pw-Rh from ChungLin_Tang@mentor.com ; Tue, 30 Jun 2015 03:51:47 -0700 Received: from [0.0.0.0] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.3.224.2; Tue, 30 Jun 2015 03:51:47 -0700 Message-ID: <559274C3.4080305@codesourcery.com> Date: Tue, 30 Jun 2015 11:03:00 -0000 From: Chung-Lin Tang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Eric Botcazou CC: , Sandra Loosemore , Kito Cheng , Jeff Law , Marcus Shawcroft , Richard Earnshaw , "Schmidt, Bernd - Code Sourcery" Subject: Re: [patch] fix regrename pass to ensure renamings produce valid insns References: <5581AA41.7010201@codesourcery.com> <55922571.2050808@codesourcery.com> <5592287F.4050203@codesourcery.com> <2385820.32MGCG8euH@polaris> In-Reply-To: <2385820.32MGCG8euH@polaris> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg02186.txt.bz2 On 2015/6/30 05:06 PM, Eric Botcazou wrote: >> I notice the way gcc_assert() is defined in system.h now, the test won't >> disappear even when runtime checks are disabled, though you might still >> adjust it to avoid any programmer confusion. > > It will disappear at run time, see the definition: > > /* Include EXPR, so that unused variable warnings do not occur. */ > #define gcc_assert(EXPR) ((void)(0 && (EXPR))) > > so you really need to use a separate variable. > I was referring to this one: #if ENABLE_ASSERT_CHECKING ... #elif (GCC_VERSION >= 4005) #define gcc_assert(EXPR) \ ((void)(__builtin_expect (!(EXPR), 0) ? __builtin_unreachable (), 0 : 0)) #else ... But yeah, I guess older GCCs could be used to build a toolchain, so a separate variable should be used. Chung-Lin