This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch]: Testcase for bug in overload resolution.



Attached is a new failing testcase for egcs.

kga
-- 
-------------------------------------------------------------------------
Klaus-Georg Adams        Email: Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Institut f. Anorg. Chemie, Lehrstuhl II            Tel: 49(0)721 608 3485
Universität Karlsruhe, D-76128 Karlsruhe
-------------------------------------------------------------------------
--- /dev/null	Mon Jul 18 01:46:18 1994
+++ gcc/testsuite/g++.old-deja/g++.robertl/eb131.C	Thu Jun 18 10:27:12 1998
@@ -0,0 +1,28 @@
+// Build don't link
+// The call to a::foo() generates an error:
+// eb131.C: In method `a::a()':
+// eb131.C:26: no matching function for call to `a::foo (void (a::*)(double))'
+// eb131.C:15: candidates are: a::foo(void (a::*)(float))
+// According to [over.over] in the CD2, &junk should resolve in this context.
+
+struct a {
+	a();
+	void junk();
+	void junk( int );
+	void junk( float );
+	void junk( double );
+	
+	void foo( void (a::*member)(float) );
+	void bar( void (*function)(float) );
+};
+
+void baz();
+void baz( int );
+void baz( float );
+void baz( double );
+
+a::a()
+{
+	foo( &junk );
+	bar( &baz );
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]