aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/overload31.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/overload31.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/overload31.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload31.C b/gcc/testsuite/g++.old-deja/g++.jason/overload31.C
new file mode 100644
index 00000000000..e45d802033f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/overload31.C
@@ -0,0 +1,24 @@
+// PRMS Id: 6568
+// Bug: g++ complains about the ambiguous conversion to bool even though
+// we wouldn't end up using it anyway.
+// Build don't link:
+
+class AString
+{
+public:
+ AString (unsigned len);
+ operator char *() const;
+ operator char const *() const;
+};
+
+void
+foo(unsigned t, AString const & handle)
+{
+}
+
+void
+foo(AString const & handle, bool includeSpecials)
+{
+ unsigned t;
+ foo(t, handle);
+}