+#include <cstdlib>
+
+/* Make sure `malloc' is linked into the program. If we don't, tests
+ in the accompanying expect file may fail:
+
+ evaluation of this expression requires the program to have a function
+ "malloc". */
+
+void
+dummy ()
+{
+ void *p = malloc (16);
+
+ free (p);
+}
/* 1. A standard covnersion sequence is better than a user-defined sequence
which is better than an elipses conversion sequence. */
return foo14(e); // 46
}
+/* Test cv qualifier overloads. */
+int foo15 (char *arg) { return 47; }
+int foo15 (const char *arg) { return 48; }
+int foo15 (volatile char *arg) { return 49; }
+int foo15 (const volatile char *arg) { return 50; }
+static int
+test15 ()
+{
+ char *c = 0;
+ const char *cc = 0;
+ volatile char *vc = 0;
+ const volatile char *cvc = 0;
+
+ // 47 + 48 + 49 + 50 = 194
+ return foo15 (c) + foo15 (cc) + foo15 (vc) + foo15 (cvc);
+}
+
int main() {
+ dummy ();
+
B b;
foo0(b);
foo1(b);
foo14(e);
test14();
+ const char *cc = 0;
+ volatile char *vc = 0;
+ const volatile char *cvc = 0;
+ test15 ();
+
return 0; // end of main
}