🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Ron Guilmette Thu, 27 Apr 1989 23:46
BUG(s) in G++ 1.35.0-
#1920
Author: Ron Guilmette
Date: Thu, 27 Apr 1989 23:46
37 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads