[Bug c++/39934] Union member incorrectly disallowed

2018-07-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39934 Jonathan Wakely changed: What|Removed |Added CC||colu...@gmx-topmail.de --- Comment #14

[Bug c++/39934] Union member incorrectly disallowed

2015-04-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39934 Jason Merrill changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/39934] Union member incorrectly disallowed

2015-04-04 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39934 Paolo Carlini changed: What|Removed |Added CC|gcc-bugs at gcc dot gnu.org|jason at gcc dot gnu.org,

[Bug c++/39934] Union member incorrectly disallowed

2010-09-16 Thread dherring at tentpost dot com
--- Comment #11 from dherring at tentpost dot com 2010-09-16 18:54 --- FWIW, the example given in the C++ draft spec, section 9.5, fails to compile in g++, even under version 4.5 with the -std=c++0x flag. (This example has been there for a few years.) Coupled with requirements such as

[Bug c++/39934] Union member incorrectly disallowed

2009-11-04 Thread redi at gcc dot gnu dot org
--- Comment #10 from redi at gcc dot gnu dot org 2009-11-04 15:28 --- To be clear: In C++0x struct A would have a deleted copy assign operator, and union U would be allowed, but its copy assignment operator would be deleted. IMHO C++03 is not clear whether struct A has a trivial assign

[Bug c++/39934] Union member incorrectly disallowed

2009-11-04 Thread redi at gcc dot gnu dot org
--- Comment #9 from redi at gcc dot gnu dot org 2009-11-04 14:41 --- http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#653 and http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#683 and http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2762 I'm still not sure

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread redi at gcc dot gnu dot org
--- Comment #8 from redi at gcc dot gnu dot org 2009-11-03 18:10 --- (In reply to comment #6) > > The ARM comment (as quoted) is clearly wrong: offhand, I can think of > two other ways of getting an object initialized. There are probably > more. > > 1. Casting the offending "const" aw

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread terra at gnome dot org
--- Comment #6 from terra at gnome dot org 2009-11-03 17:44 --- cp/class.c has code like this: /* If any field is const, the structure type is pseudo-const. * / if (CP_TYPE_CONST_P (type)) { ... /* ARM $12.6.2: [A member initializer list] (or, for an aggregate, initiali

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread paolo dot carlini at oracle dot com
--- Comment #7 from paolo dot carlini at oracle dot com 2009-11-03 17:49 --- Saying that ARM is "wrong" seems frankly rather silly to me: either the quotation is incorrect, I don't think so, or ARM has been obsoleted by the ISO Standard, perfectly possible. -- http://gcc.gnu.org/bu

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-11-03 14:21 --- (In reply to comment #4) > > I'm not sure whether using A in a union causes the implicitly-declared copy > > assignment operator to be implicitly defined, but that seems to be what's > > happening. > > No, that's not q

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread terra at gnome dot org
--- Comment #4 from terra at gnome dot org 2009-11-03 13:47 --- > I'm not sure whether using A in a union causes the implicitly-declared copy > assignment operator to be implicitly defined, but that seems to be what's > happening. No, that's not quite it. The requirement for union memb

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-11-03 13:32 --- (In reply to comment #2) > > Is there a sane workaround for this? Don't use 'const' members of unions. Union members cannot have a non-trivial copy assignment operator. The assignment operator for A cannot be implici

[Bug c++/39934] Union member incorrectly disallowed

2009-11-02 Thread redhatter at gentoo dot org
--- Comment #2 from redhatter at gentoo dot org 2009-11-03 05:45 --- Also confirmed on GCC 3.4.5 as distributed with Qt SDK: ezec...@toshiba /tmp $ /c/Qt/2009.03/mingw/bin/gcc --version gcc.exe (GCC) 3.4.5 (mingw-vista special r3) Copyright (C) 2004 Free Software Foundation, Inc. This i

[Bug c++/39934] Union member incorrectly disallowed

2009-04-27 Thread paolo dot carlini at oracle dot com
--- Comment #1 from paolo dot carlini at oracle dot com 2009-04-27 20:49 --- For the record, Comeau and Intel are not happy, though. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39934