[gnu.g++.bug] BUG in G++ 1.34.0 - overloaded methods with defaults

rfg@MCC.COM (Ron Guilmette) (03/11/89)

Using G++ 1.34.0/Sun3, errors are issued if you have overloaded
functions which only differ by some number of "defaultable"
arguments.  The same does *not* appear to be true for method
declarations within classes, as demonstrated by the following
short code (which should get some compile-time errors, but does not).

/*
Description - check that if two overloaded methods are declared within the
		same class, and if these two methods are essentially
		identical in their names and in their number, order,
		and type of parameters except that one of the two has
		more parameters than the other, but these additional
		parameters all have defaults, an error message is
		issued for the (ambiguous) declaration(s).
*/

struct class1 {
	void method1 (int arg1, int arg2);
	void method1 (int arg1, int arg2, int arg3 = 77);
};

main ()
{
	class1 class1_object;

	class1_object.method1 (88, 99);
}

// Ron Guilmette  -  MCC  -  Experimental (parallel) 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