Closed
Description
$ cat >vaargs.c <<EOF
#include <stdarg.h>
#include <stdbool.h>
double takes_double(double);
static bool takes_va_list_ptr(va_list * ap) {
double val = va_arg(*ap, double);
return takes_double(val);
}
int main() {
va_list ap;
takes_va_list_ptr(&ap);
}
EOF
$ ./bin/clang vaargs.c -c -o /dev/null -march=armv8-a+nofp --target=arm64-apple-ios
vaargs.c:6:13: error: 'takes_va_list_ptr' requires 'double' type support, but ABI 'darwinpcs' does not support it
6 | static bool takes_va_list_ptr(va_list * ap) {
| ^
vaargs.c:6:13: error: 'takes_va_list_ptr' requires 'double' type support, but ABI 'darwinpcs' does not support it
2 errors generated.
It would be less confusing if the diagnostic pointed at the call site for takes_double
, with a note pointing at takes_double
's declaration.