From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6763 invoked by alias); 27 Nov 2012 20:45:49 -0000 Received: (qmail 6733 invoked by uid 22791); 27 Nov 2012 20:45:42 -0000 X-SWARE-Spam-Status: No, hits=-9.0 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,TW_CP X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Nov 2012 20:44:57 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id A60CB33D907; Tue, 27 Nov 2012 20:44:56 +0000 (UTC) From: Mike Frysinger To: Joel Brobecker Subject: Re: New GDB 7.5.x release sometime next week? Date: Tue, 27 Nov 2012 20:45:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.6.5; KDE/4.6.5; x86_64; ; ) Cc: gdb@sourceware.org References: <20121122163146.GH9650@adacore.com> <201211271514.03376.vapier@gentoo.org> <20121127202913.GC3540@adacore.com> In-Reply-To: <20121127202913.GC3540@adacore.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1404377.dvfrYYtuQW"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201211271545.53340.vapier@gentoo.org> 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-11/txt/msg00079.txt.bz2 --nextPart1404377.dvfrYYtuQW Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1258 On Tuesday 27 November 2012 15:29:13 Joel Brobecker wrote: > > how about this in libiberty/: > > 2012-07-31 Mike Frysinger > >=20 > > * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output > > to swap_bytes, and then call memcpy to move it to ctx->buffer. >=20 > As always, a quick explanation of what it fixes, and why it is > important enough that it should be included in the release would help. > Just from the ChangeLog entry alone, I am having a difficult time > evaluating it. 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 brea= k=20 strict-aliasing rules [-Wstrict-aliasing] libiberty/md5.c:118:3: warning: dereferencing type-punned pointer will brea= k=20 strict-aliasing rules [-Wstrict-aliasing] The change below fixes things for me. The optimized output (-O2) is the sa= me before/after my change on x86_64-linux. I imagine it'll be the same for mo= st targets. It seems simpler than using a union on the md5_ctx buffer since t= hese are the only two locations in the code where this occurs. -mike --nextPart1404377.dvfrYYtuQW Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJQtSaBAAoJEEFjO5/oN/WB3sAP/A33ePegz5YpWbE14ubARW1Q gydBoa0o3gnv5cJJ2L65lWEInci/FNuqW97naQexLNFzw1K3xEYa9x8M+IupzJBV e5BThWBApGm6BPs22k4fN7ERlTS3+QFugz4MkpaaEfJuvwtabXVl+181DjetSAbm lV+yEBunYyPYIP0cwOcgIRq+nt8oMgFbKlZ+vXDO7ByiXP7mQqWDqIzWnpj5PgSi x0iO1rS51/B/ApesbvBOYzruZ4GQ29wSv888+1f8P0T7ElFr4XJMo+yl/V8TS/52 LvLG++8mQ2+Ts5yNnYLmcTE+AN+ThGrau/jz5GJ5GDZJSyN4rWY6DgeHSEcukhdE X6aHEdiyz9O3XU6teYby6Yp0C8W2iaMcBra38Bl84/waOtqyYoi/VClUTOxuO/3G Bv03RoE2sN2UW4W2TKep/a9Mn2v0l2rBNRorDJNxjOpMDaTfNIsbBFXWMoSOzD3c sLnWwX0oVEXU8YLYY6KZDMISCIB9MW3pBgR7Tp76OU4oPuXPSsEVtEHL394OTzqx Rx5k3ub/5OAbDodsnfve7Zh5xCbyF+uZ7xTDsx67sZNvfq8olz71eHkv95VBe3rR hkl9rICeLxGjwcN1REGxchziNwnanDQI0Y6+4qdrUx1Xq3d5PtrXRgGAhQj1LXXQ 7OCfUOImhWWpNCjb2aMF =p2yX -----END PGP SIGNATURE----- --nextPart1404377.dvfrYYtuQW--