gcc/testsuite/g++.dg/tc1/dr1.C
raw| 1 | // { dg-do compile } |
| 2 | // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> |
| 3 | // DR1: What if two using-declarations refer to the same function but the |
| 4 | // declarations introduce different default-arguments? |
| 5 | |
| 6 | namespace A { |
| 7 | extern "C" void f(int = 5); |
| 8 | } |
| 9 | namespace B { |
| 10 | extern "C" void f(int = 5); |
| 11 | } |
| 12 | using A::f; |
| 13 | using B::f; |
| 14 | |
| 15 | void use() { |
| 16 | f(3); |
| 17 | f(); // { dg-error "" "" { xfail *-*-* } } |
| 18 | } |