This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66632] Incorrect use of default constructor to initialize isolated rvalue.
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Jun 2015 18:14:21 +0000
- Subject: [Bug c++/66632] Incorrect use of default constructor to initialize isolated rvalue.
- Auto-submitted: auto-generated
- References: <bug-66632-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66632
Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #2 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
The program output looks correct to me. You are misinterpreting what the
semantics of the code is. The construct
Q(S1v1);
declares a variable of type Q with name S1v1, it therefore hides the enumerator
name in the next line. The next line just performs a copy of the variable S1v1
to produce the variable q2. In other words, this is not a defect.