This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/4210] should not warning with dead code
- From: "mattias at virtutech dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2006 09:22:28 -0000
- Subject: [Bug middle-end/4210] should not warning with dead code
- References: <bug-4210-955@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from mattias at virtutech dot se 2006-03-02 09:22 -------
We have resorted to case-by-case workarounds, usually a cast which would have
been an identity operation had the condition been true. That is,
if (sizeof x == 8)
return x << 32 | x;
would have its second line mutated to
return (unsigned long long)x << 32 | x;
The cast is always a no-op unless it occurs in dead code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210