diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-07-31 09:02:35 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-07-31 09:02:35 +0000 |
commit | 8eeb9da6d017761037bf757780ea544dfeabbad8 (patch) | |
tree | fb6d5e04a5ba45a26af7cc12495a8bec6534de64 /libiberty/strtol.c | |
parent | 093945b35e5881edb6060ba59d1ccab417056548 (diff) | |
download | gdb-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/strtol.c')
0 files changed, 0 insertions, 0 deletions