public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redhatter at gentoo dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/39934] Union member incorrectly disallowed Date: Tue, 03 Nov 2009 05:45:00 -0000 [thread overview] Message-ID: <20091103054531.9363.qmail@sourceware.org> (raw) In-Reply-To: <bug-39934-9033@http.gcc.gnu.org/bugzilla/> ------- 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: EzeCorp@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 is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. EzeCorp@TOSHIBA /tmp $ cat test.c struct A { const int x; int y; }; union U { const int x; struct A a; }; EzeCorp@TOSHIBA /tmp $ gcc -o test-c.o -c test.c EzeCorp@TOSHIBA /tmp $ echo $? 0 EzeCorp@TOSHIBA /tmp $ g++ -o test-cpp.o -c test.c test.c:8: error: member `A U::a' with copy assignment operator not allowed in union EzeCorp@TOSHIBA /tmp $ echo $? 1 Is there a sane workaround for this? -- redhatter at gentoo dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |redhatter at gentoo dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39934
next prev parent reply other threads:[~2009-11-03 5:45 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-04-27 20:30 [Bug c++/39934] New: " terra at gnome dot org 2009-04-27 20:49 ` [Bug c++/39934] " paolo dot carlini at oracle dot com 2009-11-03 5:45 ` redhatter at gentoo dot org [this message] 2009-11-03 13:33 ` redi at gcc dot gnu dot org 2009-11-03 13:47 ` terra at gnome dot org 2009-11-03 14:21 ` redi at gcc dot gnu dot org 2009-11-03 17:44 ` terra at gnome dot org 2009-11-03 17:49 ` paolo dot carlini at oracle dot com 2009-11-03 18:10 ` redi at gcc dot gnu dot org 2009-11-04 14:41 ` redi at gcc dot gnu dot org 2009-11-04 15:28 ` redi at gcc dot gnu dot org 2010-09-16 18:54 ` dherring at tentpost dot com [not found] <bug-39934-4@http.gcc.gnu.org/bugzilla/> 2015-04-04 10:10 ` paolo.carlini at oracle dot com 2015-04-06 13:34 ` jason at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20091103054531.9363.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).