This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26078] g++ compile error in calling another constructor inside a constructor
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2006 17:58:21 -0000
- Subject: [Bug c++/26078] g++ compile error in calling another constructor inside a constructor
- References: <bug-26078-12118@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-02 17:58 -------
Actually this is invalid code:
"tclass::tclass(i);" does not what you think it does.
It declares the variable "i" as the type tclass::tclass.
Now "tclass::tclass" is invalid type anyways but that is a different bug and
filed as PR 11764.
Now the cast will force what you want as the parse is not ambiguous as before
it was and the C++ standard says that declared a variable.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26078