[Bug c++/72756] Using an enum as a constant expression via dot operator should not compile.

2024-07-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756 --- Comment #7 from Andrew Pinski --- Note the paper that was acepted in the end is https://wg21.link/p2280 .

[Bug c++/72756] Using an enum as a constant expression via dot operator should not compile.

2024-07-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756 Jonathan Wakely changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/72756] Using an enum as a constant expression via dot operator should not compile.

2021-08-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756 --- Comment #5 from Jonathan Wakely --- Reduced further, since it doesn't actually depend on templates: struct S { enum { e = 4 }; }; int f(S& s) { constexpr int i = s.e; return i; } This is only ill-formed because s is a reference. Usin

[Bug c++/72756] Using an enum as a constant expression via dot operator should not compile.

2021-08-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756 --- Comment #4 from Andrew Pinski --- https://wg21.link/p2280r2

[Bug c++/72756] Using an enum as a constant expression via dot operator should not compile.

2021-08-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/72756] Using an enum as a constant expression via dot operator should not compile.

2016-07-30 Thread claas.bontus at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756 --- Comment #2 from Claas --- No. See the live demo at http://coliru.stacked-crooked.com/a/79f0d052864fec19

[Bug c++/72756] Using an enum as a constant expression via dot operator should not compile.

2016-07-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756 --- Comment #1 from Andrew Pinski --- I suspect it is rejected at instantation time rather than definition time.