This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/34386] -Wstrict-aliasing=3 ineffective (tree-ssa-alias-warnings.c)
- From: "hp at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Dec 2007 00:44:33 -0000
- Subject: [Bug middle-end/34386] -Wstrict-aliasing=3 ineffective (tree-ssa-alias-warnings.c)
- References: <bug-34386-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from hp at gcc dot gnu dot org 2007-12-08 00:44 -------
I'm not sure this is related but a while ago I ran valgrind hoping to
spot the cause for another bug, and valgrind complained about
tree-ssa-alias-warnings.c:processed_func_p (tree func)
which hashes the address of its argument:
*slot = &func;
where it probably meant
*slot = func;
This bug looked like it could mask warnings or possibly cause multiple
warnings for the same code.
Another solution would replace the machinery where this is used with
a pointer_set for the hashing, or available bits in the tree to mark
the visitedness.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34386