[Bug c++/91264] modifying const-qual object in constexpr context not detected

2019-08-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91264 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/91264] modifying const-qual object in constexpr context not detected

2019-08-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91264 --- Comment #5 from Marek Polacek --- Author: mpolacek Date: Mon Aug 19 13:59:13 2019 New Revision: 274671 URL: https://gcc.gnu.org/viewcvs?rev=274671=gcc=rev Log: PR c++/91264 - detect modifying const objects in constexpr. *

[Bug c++/91264] modifying const-qual object in constexpr context not detected

2019-07-31 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91264 Marek Polacek changed: What|Removed |Added Keywords||patch --- Comment #4 from Marek Polacek

[Bug c++/91264] modifying const-qual object in constexpr context not detected

2019-07-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91264 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug c++/91264] modifying const-qual object in constexpr context not detected

2019-07-26 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91264 --- Comment #3 from Marek Polacek --- Another: struct X { int j; constexpr X() : j(0) { } }; struct Y { X x; constexpr Y() : x{} { } }; constexpr void g () { constexpr Y y{}; Y *p = const_cast(); p->x.j = 99; }

[Bug c++/91264] modifying const-qual object in constexpr context not detected

2019-07-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91264 --- Comment #2 from Marek Polacek --- Another test: constexpr void f (int ) { r = 99; } constexpr int f2 () { const int i = 0; f (const_cast(i)); return i; } constexpr int i = f2 ();

[Bug c++/91264] modifying const-qual object in constexpr context not detected

2019-07-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91264 --- Comment #1 from Marek Polacek --- Similar for e.g. const_cast(i)++;