🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Ron Guilmette Thu, 27 Apr 1989 22:41
BUG in G++ 1.35.0-
#1919
Author: Ron Guilmette
Date: Thu, 27 Apr 1989 22:41
38 lines
1648 bytes
The following file fails compilation when using G++ 1.35.0- on a Sun3.
This same file passes compilation (without errors or warnings) when
using g++ 1.34.1.  I believe that it is legal code and should pass.

-------------------------------------------------------------------------
// Check that if explicit conversion (to a base type) is used,
// the compiler can still find a proper (implicitly generated)
// initialization member function to apply to the converted value.

struct base {
	int base_member;

	base () {}
	//base (const base& br) { *this = br; }		// This makes it work.
};

struct derived : public base {
	int derived_member;
};

base base_object;

int main ()
{
	derived derived_object;

	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 -ansi -pedantic -S -v a026.C
In function int main ():
a026.C:22: too many 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