From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45141 invoked by alias); 9 Jul 2015 06:55:44 -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 45102 invoked by uid 89); 9 Jul 2015 06:55:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Jul 2015 06:55:41 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-19-9epU3gRCRNuYXnxnb8CW3g-1; Thu, 09 Jul 2015 07:55:37 +0100 Received: from localhost ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 9 Jul 2015 07:55:36 +0100 From: Richard Sandiford To: Kito Cheng Mail-Followup-To: Kito Cheng ,Marek Polacek , "gcc-patches\@gcc.gnu.org" , richard.sandiford@arm.com Cc: Marek Polacek , "gcc-patches\@gcc.gnu.org" Subject: Re: Drop -Wswitch-bool warning in function.c References: <20150708133044.GA16027@redhat.com> Date: Thu, 09 Jul 2015 06:55:00 -0000 In-Reply-To: (Kito Cheng's message of "Thu, 9 Jul 2015 00:12:56 +0800") Message-ID: <87vbdtkefr.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-MC-Unique: 9epU3gRCRNuYXnxnb8CW3g-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-07/txt/msg00679.txt.bz2 Kito Cheng writes: > Yes, I know it's non-fatal warning, but I think gcc should build with > --enable-werror-always by it's self > and it's the *ONLY* warning in trunk now. Yeah, but it should only build with --enable-werror-always if your host compiler is the same version as the one you're building. It would be too much to expect it to compile cleanly with older versions too, since there's no obvious place to draw the line. So Marek's point was that current GCC (deliberately) does not warn about this switch statement. The switch statement used to be: /* Allow the target to compare Y with X without leaking either into a register. */ switch ((int) (HAVE_stack_protect_test !=3D 0)) but the (int) cast was removed at the same time as the warning was adjusted: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00790.html (BTW, although you cc:ed me, it was that patch rather than mine that introduced the warnings when using unpatched host compilers.) Thanks, Richard