[Bug c++/58102] rejects valid initialization of constexpr object with mutable member

2014-11-18 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58102 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED CC|

[Bug c++/58102] rejects valid initialization of constexpr object with mutable member

2014-11-18 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58102 --- Comment #4 from Jason Merrill --- Author: jason Date: Tue Nov 18 13:34:08 2014 New Revision: 217713 URL: https://gcc.gnu.org/viewcvs?rev=217713&root=gcc&view=rev Log: PR c++/58102 * typeck2.c (store_init_value): Set it. * cp-tree

[Bug c++/58102] rejects valid initialization of constexpr object with mutable member

2014-09-15 Thread richard-gccbugzilla at metafoo dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58102 --- Comment #3 from Richard Smith --- Thanks, that is (was) a Clang bug; I've just fixed it. And there's a standard defect here too, as far as I can see: union U { int a; mutable int b; }; constexpr U u1 = {1}; int k = (u1.b = 2); conste

[Bug c++/58102] rejects valid initialization of constexpr object with mutable member

2014-09-15 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58102 --- Comment #2 from Paolo Carlini --- Richard I'm trying to fix this bug, and while working on a draft I noticed that current clang accepts: struct A { int i; mutable int j; }; constexpr A a = { 0, 1 }; constexpr A b = a; ie, doesn't rejec

[Bug c++/58102] rejects valid initialization of constexpr object with mutable member

2014-09-01 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58102 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|