From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32204 invoked by alias); 15 Oct 2014 18:59:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 32190 invoked by uid 89); 15 Oct 2014 18:59:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: glazunov.sibelius.xs4all.nl Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 15 Oct 2014 18:59:10 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id s9FIwxMf028100; Wed, 15 Oct 2014 20:58:59 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id s9FIwxF3019027; Wed, 15 Oct 2014 20:58:59 +0200 (CEST) Date: Wed, 15 Oct 2014 18:59:00 -0000 Message-Id: <201410151858.s9FIwxF3019027@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gang.chen.5i5j@gmail.com, gdb-patches@sourceware.org, palves@redhat.com In-reply-to: <20141015184711.GF25846@adacore.com> (message from Joel Brobecker on Wed, 15 Oct 2014 11:47:11 -0700) Subject: Re: [PATCH v2] gdb/i387-tdep.c: Avoid warning for "-Werror=strict-overflow" References: <543A8208.9060605@gmail.com> <201410131516.s9DFGPh9005236@glazunov.sibelius.xs4all.nl> <543BF857.9080805@gmail.com> <20141015184711.GF25846@adacore.com> X-SW-Source: 2014-10/txt/msg00407.txt.bz2 > Date: Wed, 15 Oct 2014 11:47:11 -0700 > From: Joel Brobecker > > Hi Mark, > > > > Sorry, I disagree with this approach. I think your compiler is really > > > being unhelpful here. See if a newer GCC version of the compiler > > > still triggers that warning. If so, complain to the GCC people. > > Would you be OK with Pedro's suggested approach where we have > an additional macro that provides the number of ST registers? > That should get rid of the warning, and it seems like the code > might actually even be slightly better for it; it would make it > obvious that you iterate over a fixed number of registers, and > which ones you are interating over; [ST0 .. XMM0[ does not make > it as clear that the range only refers to ST registers, for instance. Pedro's suggestion made sense to me.