From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28807 invoked by alias); 27 Nov 2012 21:25:27 -0000 Received: (qmail 28798 invoked by uid 22791); 27 Nov 2012 21:25:26 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Nov 2012 21:24:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D16082E206; Tue, 27 Nov 2012 16:24:50 -0500 (EST) 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 79CXE88iGzxU; Tue, 27 Nov 2012 16:24:50 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1DFE02E027; Tue, 27 Nov 2012 16:24:50 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 1E25CC2713; Tue, 27 Nov 2012 22:24:46 +0100 (CET) Date: Tue, 27 Nov 2012 21:25:00 -0000 From: Joel Brobecker To: Mike Frysinger Cc: gdb@sourceware.org Subject: Re: New GDB 7.5.x release sometime next week? Message-ID: <20121127212445.GD3540@adacore.com> References: <20121122163146.GH9650@adacore.com> <201211271514.03376.vapier@gentoo.org> <20121127202913.GC3540@adacore.com> <201211271545.53340.vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201211271545.53340.vapier@gentoo.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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-11/txt/msg00082.txt.bz2 > Subject: [PATCH] libiberty/md5: fix strict alias warnings > > Current libiberty md5 code triggers these warnings with gcc-4.7.1 for me: > > libiberty/md5.c: In function 'md5_finish_ctx': > libiberty/md5.c:117:3: warning: dereferencing type-punned pointer will break > strict-aliasing rules [-Wstrict-aliasing] > libiberty/md5.c:118:3: warning: dereferencing type-punned pointer will break > strict-aliasing rules [-Wstrict-aliasing] > > The change below fixes things for me. The optimized output (-O2) is > the same before/after my change on x86_64-linux. I imagine it'll be > the same for most targets. It seems simpler than using a union on the > md5_ctx buffer since these are the only two locations in the code > where this occurs. I am on the fence regarding this change. On the one hand, it seems hardly critical, since it only fixes some warnings, and does not seem to cause any improvement in the actual code generated. On the other hand, this module appears to be completely unused in all of GDB (?). So the risk would be small. For that reason, and the fact that the code has been in since end of July, I think it's OK to include it, and avoid the warnings. Thanks, -- Joel