Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!MCC.COM!rfg From: rfg@MCC.COM (Ron Guilmette) Newsgroups: gnu.g++.bug Subject: BUG(s) in G++ 1.35.0- Message-ID: <8904272346.AA05582@riunite.aca.mcc.com> Date: 27 Apr 89 23:46:29 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 37 The following code, if compiled with G++ 1.35.0- on a Sun3 will fail compilation even though (I believe) that it is perfectly legal code. ------------------------------------------------------------------- // Check that it is legal to convert an object of a derived class // to an object of a base class. struct base { base () {} base (float x, float y) {} // Conversion tries to call this // Who knows why? }; struct derived : public base { }; base base_object; derived derived_object; int main () { base_object = (base) derived_object; return 0; } -------------------------------------------------------------------- /usr/local/src/src/g++/build/sun3/1.35-.0-.0/g++ -B/usr/local/src/src/g++/build/sun3/1.35-.0-.0/ -Wall -Wwrite-strings -S -v a027.C In function int main (): a027.C:19: aggregate value used where a float was expected a027.C:19: too few arguments to function // Ron Guilmette - MCC - Experimental Systems Kit Project // 3500 West Balcones Center Drive, Austin, TX 78759 - (512)338-3740 // ARPA: rfg@mcc.com // UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg