diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 03:44:48 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 03:44:48 +0000 |
commit | 5412fedb52dbacf865eb52c8d589cbb1a4eaa00f (patch) | |
tree | 4b4b914d985e7a40bf89923f3bc3cb2b64094be0 /gcc/testsuite | |
parent | c68bcf58659af2ffd98e8a70cabdcd5e94888a20 (diff) | |
download | gcc-5412fedb52dbacf865eb52c8d589cbb1a4eaa00f.tar.gz |
PR c++/34691
* name-lookup.c (merge_functions): Keep multiple extern "C" functions.
* call.c (joust): Complain about mismatched default arguments
in extern "C" functions.
* class.c (resolve_address_of_overloaded_function): Handle multiple
extern "C" functions.
* pt.c (resolve_overloaded_unification): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145709 138bc75d-0d04-0410-961f-82ee72b054a4
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" } +} + |