From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7976 invoked by alias); 25 Apr 2012 18:20:31 -0000 Received: (qmail 7967 invoked by uid 22791); 25 Apr 2012 18:20:29 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Apr 2012 18:20:16 +0000 Received: by iajr24 with SMTP id r24so529551iaj.0 for ; Wed, 25 Apr 2012 11:20:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=aqOq9c6oW9Am2tjDBgDjBGnU5OdARie7V/3zLErLoNQ=; b=Xd/wbpf/7foRmGbZLupq8aozwoei5tHYQ9X7GN2hfy2kJmnmCUsgYuxoTaKregh+ha jII6mUa/YVbRuvEEFHvHXfwqxhkjeQS3IPaYPYFGrPdDiyn292cI4OHubJho/Vp53ieX hbVKaaUNmxgtPGGesm7Evdq3v0O4bY4WpMXKlEWmSr4YpLviIeP/vrPaHjzII9Wr2w3+ fF+/+Qst3iE74oOf1m2dT3ZzdYIKAGOC7Bkd5HVL0wZ8vnqSyEXAV+v/P7RZwPtN866p D2ClcfGPD0EHpPq5LZ9lpBq1IID90GVs0BS4ApyJVo5rz5Z0sWZz8PN7hj4OU5SqiBH0 pacQ== Received: by 10.42.107.9 with SMTP id b9mr3075225icp.18.1335378016022; Wed, 25 Apr 2012 11:20:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.107.9 with SMTP id b9mr3075211icp.18.1335378015912; Wed, 25 Apr 2012 11:20:15 -0700 (PDT) Received: by 10.231.0.130 with HTTP; Wed, 25 Apr 2012 11:20:15 -0700 (PDT) In-Reply-To: References: <20120422082240.GA21311@host2.jankratochvil.net> <87sjfufrlr.fsf@fleche.redhat.com> Date: Wed, 25 Apr 2012 18:20:00 -0000 Message-ID: Subject: Re: Switch -Wunused-variable on? From: Sterling Augustine To: Andreas Schwab Cc: "Maciej W. Rozycki" , Tom Tromey , Sergio Durigan Junior , Jan Kratochvil , gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQkTj91Zv4/4reRwaHdTIyqgDLSxEOrIfQ2VbclFLH1M4JFISnlg72eSxkAj/Jzc/QNoBUPxxMmYqY3Up/NvBHjUQ8Wr6lRIGkRxdgDrbu239fr18qnsxMgcSdowJFM61i0lWmMt X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00216.txt.bz2 On Wed, Apr 25, 2012 at 11:13 AM, Andreas Schwab wr= ote: > "Maciej W. Rozycki" writes: > >> =A0Then you don't actually need a definition, because the call will be >> optimised away > > You still need to support unoptimized builds. GCC eliminates the unreachable block of an "if (0)" even without optimization. Many other compilers don't. It is an ongoing source of complications for getting compilers other than GCC to build the linux kernel which uses this approach extensively. If the project cares about being able to build with compilers other than GCC, then it should consider this approach as carefully as it considers using any other GCC extension. Sterling