Commit 711b552c by Alexandre Oliva Committed by Alexandre Oliva

* overload1.C: New test.

From-SVN: r29499
parent 7cd33af0
1999-09-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br> 1999-09-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* overload1.C: New test.
* inline1.C: New test. * inline1.C: New test.
1999-08-25 Alexandre Oliva <oliva@dcc.unicamp.br> 1999-08-25 Alexandre Oliva <oliva@dcc.unicamp.br>
......
// Build don't link:
// Copyright (C) 1999 Free Software Foundation
// by Alexandre Oliva <oliva@lsd.ic.unicamp.br>
// Based on bug report by JDonner <jdonner@schedsys.com>
struct foo {
static int bar(); // ERROR - candidate
void bar(int); // ERROR - candidate
};
/* gcc emits a hard error without -pedantic, and a warning with
-pedantic, even in bad1. */
int (*ok1)() = foo::bar; // gets bogus error - XFAIL *-*-*
void (foo::*bad1)(int) = foo::bar; // ERROR - missing &
int (*ok2)() = &foo::bar; // ok
void (*bad2)(int) = foo::bar; // ERROR - overload resolution fails
void (foo::*ok3)(int) = &foo::bar; // ok
int (foo::*bad3)() = foo::bar; // ERROR - overload resolution fails
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment