[Bug c/107785] Integer comparison result compile with -O3

2022-11-21 Thread mugglewei at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107785 Muggle Wei changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/107785] Integer comparison result compile with -O3

2022-11-21 Thread mugglewei at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107785 --- Comment #4 from Muggle Wei --- (In reply to Andrew Pinski from comment #2) > Unsigned integer types are defined to be wrapping types which is why it > works with that. Indeed! It was my fault, appreciate for your answer!

[Bug c/107785] Integer comparison result compile with -O3

2022-11-21 Thread mugglewei at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107785 --- Comment #3 from Muggle Wei --- (In reply to Andrew Pinski from comment #2) > Unsigned integer types are defined to be wrapping types which is why it > works with that. Thanks for the reply, I had thought that integer overflow would only aff

[Bug c/107785] New: Integer comparison result compile with -O3

2022-11-21 Thread mugglewei at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107785 Bug ID: 107785 Summary: Integer comparison result compile with -O3 Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c