[LLVMbugs] [Bug 11382] Pointer comparison failure with opt -O2

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 16 00:22:47 PST 2011


Eli Friedman <sharparrow1 at yahoo.com> changed:

           What    |Removed                     |Added
             Status|REOPENED                    |RESOLVED
                 CC|                            |sharparrow1 at yahoo.com
         Resolution|                            |INVALID

--- Comment #7 from Eli Friedman <sharparrow1 at yahoo.com> 2011-11-16 02:22:47 CST ---
"If both the pointer operand and the result point to elements of the same array
object, or one past the last element of the array object, the evaluation shall
not produce an overflow; otherwise, the behavior is undefined".  You hit the
undefined behavior by subtracting 1 from pp.

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.

More information about the llvm-bugs mailing list