[Bug c++/95148] -Wtype-limits always-false warning triggered despite comparison being avoided

2022-10-26 Thread eyalroz1 at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95148 --- Comment #4 from Eyal Rozenberg --- (In reply to Jonathan Wakely from comment #3) > > I should not be getting this warning, because when x is unsigned, the > > comparison is never performed, due to the short-circuit semantics of `and`. > >

[Bug c++/95148] -Wtype-limits always-false warning triggered despite comparison being avoided

2022-10-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95148 --- Comment #3 from Jonathan Wakely --- (In reply to Eyal Rozenberg from comment #0) > a.cpp:5:52: warning: comparison of unsigned expression < 0 is always false > [-Wtype-limits] Both branches of the condition must be instantiated by the

[Bug c++/95148] -Wtype-limits always-false warning triggered despite comparison being avoided

2022-10-26 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95148 Vincent Lefèvre changed: What|Removed |Added CC||vincent-gcc at vinc17 dot net ---

[Bug c++/95148] -Wtype-limits always-false warning triggered despite comparison being avoided

2022-10-25 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95148 Eric Gallager changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill