This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/4210] should not warning with dead code



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]