http://llvm.org/bugs/show_bug.cgi?id=2528


Ted Kremenek <[EMAIL PROTECTED]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |INVALID




--- Comment #2 from Ted Kremenek <[EMAIL PROTECTED]>  2008-07-07 15:40:51 ---
I think you're misreading the bug report.  The warning I see is:

<stdin>:11:40: warning: Value stored to 'bytes' is never read
    unsigned bg = *((unsigned*)bytes); bytes += sizeof(unsigned);
                                       ^        ~~~~~~~~~~~~~~~~
1 diagnostic generated.

The warning is not about the assignment to bg, its about the "+=" performed to
"bytes".  Both the HTML output and console output indicate that the bug has to
do with the expression:

   bytes += sizeof(unsigned);

What happens is that the value of bytes is incremented (which is essentially a
load, addition, store), but then that new value stored to bytes is never read. 
So this isn't a false positive.  There is a dead store here (and a dead
operation).


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to