This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18000] g++ interprets a variable declaration as a function prototype when the arguments to the constructor are temporaries
- From: "schveiguy at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Oct 2004 19:51:44 -0000
- Subject: [Bug c++/18000] g++ interprets a variable declaration as a function prototype when the arguments to the constructor are temporaries
- References: <20041014150837.18000.schveiguy@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schveiguy at yahoo dot com 2004-10-14 19:51 -------
(In reply to comment #1)
> This is correct behaviour. [8.2]
whoops! I'll be damned. It doesn't seem like it should be proper behavior :)
sorry. Thanks for the quick reply.
If anyone reads this bug, and has a similar problem, the fix for the code
above is to change the line to:
x myvar = x(y(v));
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18000