Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!SUN.COM!tiemann From: tiemann@SUN.COM (Michael Tiemann) Newsgroups: gnu.g++.bug Subject: type conversion operators Message-ID: <8909121242.AA06579@teacake.sun.com> Date: 12 Sep 89 12:42:29 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: tiemann@sun.com Distribution: gnu Organization: GNUs Not Usenet Lines: 28 I found out that AT&T cfront 2.0 now complains if the return type is specified for a type conversion operator: struct A { void * operator void * (); // gives error message }; I am therefore making GNU C++ give a warning message about this, with the intention of turning it into an error message later. Such redundancy should be avoided. On the other hand, cfront also complains about multiple initiaizations: int f (int = 0); int f (int a = 0) // multiple initializations { ... } I don't think this is such a hot idea, since the declaration of f and its definition could be in different files, and it is nice to see consistent facts at both sites. I consider this form of redundancy useful until all editors (including vi) implement hypertext. Michael