Article View: gnu.g++.bug
Article #1920BUG(s) in G++ 1.35.0-
From: Ron Guilmette
Date: Thu, 27 Apr 1989 23:46
Date: Thu, 27 Apr 1989 23:46
37 lines
1496 bytes
1496 bytes
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
Technical Details
Message-ID:
<8904272346.AA05582@riunite.aca.mcc.com>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!MCC.COM!rfgShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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