summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/overload/extern-C-1.C
blob: 839a0b49ae29eab6b0ca34d959cc6217bfcb5aa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/34691

namespace A {
  extern "C" void f(int = 5);	// { dg-message "= 5" }
}
namespace B {
  extern "C" void f(int = 4);	// { dg-message "= 4" }
}

using A::f;
using B::f;
int main() {
  void (*fp)(int) = f;		// OK
  f(3);				// OK
  f();				// { dg-error "default argument mismatch" }
}