Files
binutils-gdb/gdb/testsuite/gdb.cp
Hannes Domani 1d2f86b6b7 Allow calling of variadic C++ functions
Currently, it's not possible to call a variadic C++ function:
```
(gdb) print sum_vararg_int(1, 10)
Cannot resolve function sum_vararg_int to any overloaded instance
(gdb) print sum_vararg_int(2, 20, 30)
Cannot resolve function sum_vararg_int to any overloaded instance
```

It's because all additional arguments get the TOO_FEW_PARAMS_BADNESS
rank by rank_function, which disqualifies the function.

To fix this, I've created the new VARARG_BADNESS rank, which is
used only for additional arguments of variadic functions, allowing
them to be called:
```
(gdb) print sum_vararg_int(1, 10)
$1 = 10
(gdb) print sum_vararg_int(2, 20, 30)
$2 = 50
```

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28589
Approved-By: Tom Tromey <tom@tromey.com>
2023-12-14 16:18:25 +01:00
..
2023-12-11 15:50:00 +01:00
2023-12-11 15:50:00 +01:00
2023-07-11 08:53:34 -06:00
2023-06-03 22:43:57 +02:00
2023-07-11 08:53:34 -06:00
2023-01-13 13:18:58 -07:00
2023-06-03 22:43:57 +02:00
2023-01-26 18:28:32 -07:00