[Bug c++/55986] RHS of logical operators may render LHS unevaluated in constant-expression

2021-07-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55986 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Keywords|

[Bug c++/55986] RHS of logical operators may render LHS unevaluated in constant-expression

2015-10-21 Thread yaghmour.shafik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55986 --- Comment #5 from Shafik Yaghmour --- It looks like this case from this Stackoverflow question http://stackoverflow.com/q/32920229/1708801 is possibly related: int main(int argc, char**) { constexpr int a = argc * 0; } gcc treats `argc *

[Bug c++/55986] RHS of logical operators may render LHS unevaluated in constant-expression

2015-07-29 Thread yaghmour.shafik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55986 Shafik Yaghmour changed: What|Removed |Added CC||yaghmour.shafik at gmail dot com ---

[Bug c++/55986] RHS of logical operators may render LHS unevaluated in constant-expression

2013-01-15 Thread potswa at mac dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55986 --- Comment #3 from David Krauss 2013-01-15 08:02:55 UTC --- Likewise this is allowed: switch( 0 ) case i-i: ; I think this is a purposeful language extension, which could use a switch to disable. It would be nice if static_assert we

[Bug c++/55986] RHS of logical operators may render LHS unevaluated in constant-expression

2013-01-14 Thread potswa at mac dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55986 --- Comment #2 from David Krauss 2013-01-15 04:48:47 UTC --- Passing `-O2` additionally causes it to skip a condition like `(i == 0 || i != 0)`, so it looks like a general issue with expression simplification bypassing use.

[Bug c++/55986] RHS of logical operators may render LHS unevaluated in constant-expression

2013-01-14 Thread potswa at mac dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55986 --- Comment #1 from David Krauss 2013-01-15 04:47:53 UTC --- Passing `-O2` additionally causes it to skip a condition like `(i == 0 || i != 0)`, so it looks like a general issue with expression simplification bypassing ODR-use.