Issue 102983
Summary [AArch64] no-FP ABI check blames caller's declaration
Labels new issue
Assignees
Reporter jroelofs
    ```
$ 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);
}

float foo(float);

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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to