diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/overload/extern-C-1.C | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 85a616da84f..a0fee86c2fa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-04-07 Jason Merrill <jason@redhat.com> + + PR c++/34691 + * g++.dg/overload/extern-C-1.C: New. + 2009-04-07 Dominique d'Humieres <dominiq@lps.ens.fr> PR testsuite/39325 diff --git a/gcc/testsuite/g++.dg/overload/extern-C-1.C b/gcc/testsuite/g++.dg/overload/extern-C-1.C new file mode 100644 index 00000000000..839a0b49ae2 --- /dev/null +++ b/gcc/testsuite/g++.dg/overload/extern-C-1.C @@ -0,0 +1,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" } +} + |