This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/26078] g++ compile error in calling another constructor inside a constructor



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]