diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/overload/error7.C')
-rw-r--r-- | gcc/testsuite/g++.dg/overload/error7.C | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/overload/error7.C b/gcc/testsuite/g++.dg/overload/error7.C new file mode 100644 index 0000000..de50ce5 --- /dev/null +++ b/gcc/testsuite/g++.dg/overload/error7.C @@ -0,0 +1,10 @@ +// PR c++/115239 + +bool foo(char *, long); // #1, strictly viable, ambig with #2 +bool foo(char *, unsigned); // #2, strictly viable, ambig with #1 +bool foo(char, long); // #3, non-strictly viable +bool foo(char, unsigned); // #4, non-strictly viable + +int main() { + foo((char *)0, 0); // { dg-error "ambiguous" } +} |