[Bug c++/38622] operator ?: Does not check identity of types

2008-12-25 Thread lisp2d at lisp2d dot net
--- Comment #5 from lisp2d at lisp2d dot net 2008-12-25 14:36 --- Let's start from the beginning. class A{public:intx;A():x(0){};}; class B:publicA{public:inty;B():A(),y(0){};}; class C:publicA{public:intz;C():A(),z(0){};}; B xb; C xc; A

[Bug c++/38622] operator ?: Does not check identity of types

2008-12-25 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2008-12-25 15:30 --- (In reply to comment #5) Let's start from the beginning. class A{public:intx;A():x(0){};}; class B:publicA{public:inty;B():A(),y(0){};}; class C:publicA{public:int

[Bug c++/38622] operator ?: Does not check identity of types

2008-12-24 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-24 20:31 --- This works for me, the code is valid as xa is converted into B via a copyconstructor and then that is converted into a via the copy constructor. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38622

[Bug c++/38622] operator ?: Does not check identity of types

2008-12-24 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-12-24 20:32 --- *** Bug 38623 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38622

[Bug c++/38622] operator ?: Does not check identity of types

2008-12-24 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2008-12-24 23:16 --- makes memory crash What do you mean by makes memory crash. also what version of GCC are you using? And what do you behavior do you get from GCC and what do you expect to get? -- pinskia at gcc dot gnu dot org

[Bug c++/38622] operator ?: Does not check identity of types

2008-12-24 Thread lisp2d at lisp2d dot net
--- Comment #4 from lisp2d at lisp2d dot net 2008-12-25 05:41 --- If commands if and ?: operate on a miscellaneous. Not clearly when works copyconstructor and when there is no. class A{public:intx;A():x(0){};}; class B:publicA{public:inty;B():A(),y(0){};}; class