summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ext/overload1.C
blob: f7c8018ecdd21a5325b1560245d622b22f8b87fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// { dg-options "-fpermissive" }

// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 28 Feb 2001 <nathan@codesourcery.com>

// Make sure we warn about our overload extension about picking the
// one with the least worse conversion

struct X
{
  X (int);
};
void Foo (int, float, bool);	// { dg-message "candidate" }
void Foo (float, int, X);	// { dg-message "candidate" }

void Baz ()
{
  Foo (1, 1, 0);    // { dg-warning "worst" }
}