D.gnu - DLI operator overloading + goals
- Brad Beveridge (21/21) Jan 17 2003 Hi all, in my playing with DLI I've noticed that operator overloading
Hi all, in my playing with DLI I've noticed that operator overloading only work for eq() and add(). A bit of a look through machine-i386.cpp and a bit of a hack got me subtration working too - but only for class/struct op class/struct type expressions. I've also just found that I get an error with ... Mytest sub(int i) ... there is the error Error: incompatible types for ((t2) - (1)): 'Mytest' and 'int' Which is an error code in cast.cpp So I'm guessing that this is another feature that isn't quite ready for primetime yet (operator overloading was added late if I recal?) I think that this is a frontend problem in the cast.cpp file and a backend issue in machine-i386 - am I right here? My second question is about the goals of DLI - the README says that this is a first pass attempt to write a D backend in order to write an entire compiler for D in D?. From the little I know about compilers having a self hosting compiler is usually a good thing as it catches a lot of bugs. Also, how is the gcc backend project going? Cheers Brad
Jan 17 2003