summaryrefslogtreecommitdiff
path: root/libiberty/hex.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-07-31 09:02:35 +0000
committerMike Frysinger <vapier@gentoo.org>2012-07-31 09:02:35 +0000
commit8eeb9da6d017761037bf757780ea544dfeabbad8 (patch)
treefb6d5e04a5ba45a26af7cc12495a8bec6534de64 /libiberty/hex.c
parent093945b35e5881edb6060ba59d1ccab417056548 (diff)
downloadgdb-8eeb9da6d017761037bf757780ea544dfeabbad8.tar.gz
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.
Diffstat (limited to 'libiberty/hex.c')
0 files changed, 0 insertions, 0 deletions