From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22486 invoked by alias); 15 Oct 2014 18:47:14 -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 22471 invoked by uid 89); 15 Oct 2014 18:47:13 -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 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 15 Oct 2014 18:47:12 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DDB7F11628C; Wed, 15 Oct 2014 14:47:10 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8-FoVXu2+YE4; Wed, 15 Oct 2014 14:47:10 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7832E116257; Wed, 15 Oct 2014 14:47:10 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 2E15C40DC2; Wed, 15 Oct 2014 11:47:11 -0700 (PDT) Date: Wed, 15 Oct 2014 18:47:00 -0000 From: Joel Brobecker To: Chen Gang Cc: Mark Kettenis , gdb-patches@sourceware.org, palves@redhat.com Subject: Re: [PATCH v2] gdb/i387-tdep.c: Avoid warning for "-Werror=strict-overflow" Message-ID: <20141015184711.GF25846@adacore.com> References: <543A8208.9060605@gmail.com> <201410131516.s9DFGPh9005236@glazunov.sibelius.xs4all.nl> <543BF857.9080805@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <543BF857.9080805@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-10/txt/msg00406.txt.bz2 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. -- Joel