From: Mike Frysinger <vapier@gentoo.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb@sourceware.org
Subject: Re: New GDB 7.5.x release sometime next week?
Date: Tue, 27 Nov 2012 20:45:00 -0000 [thread overview]
Message-ID: <201211271545.53340.vapier@gentoo.org> (raw)
In-Reply-To: <20121127202913.GC3540@adacore.com>
[-- Attachment #1: Type: Text/Plain, Size: 1267 bytes --]
On Tuesday 27 November 2012 15:29:13 Joel Brobecker wrote:
> > how about this in libiberty/:
> > 2012-07-31 Mike Frysinger <vapier@gentoo.org>
> >
> > * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output
> > to swap_bytes, and then call memcpy to move it to ctx->buffer.
>
> 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 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.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-11-27 20:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 16:32 Joel Brobecker
2012-11-27 20:13 ` Mike Frysinger
2012-11-27 20:29 ` Joel Brobecker
2012-11-27 20:45 ` Mike Frysinger [this message]
2012-11-27 21:25 ` Joel Brobecker
2012-11-27 21:38 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201211271545.53340.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox