Issue 128361
Summary [Clang] -Wpsabi complains too eagerly
Labels clang:diagnostics
Assignees
Reporter philnik777
    Clang currently complains when calling a function that the ABI changes if a feature is enabled, but ignores that the function is marked `[[gnu::always_inline]]`, which ensures that the type will never be part of the ABI. e.g.
```c++
using vec [[gnu::vector_size(32)]] = int;

[[gnu::always_inline]] vec test() {
  return {};
}

void call() {
  (void)test(); // complains that test() changes the ABI with avx enabled
}
```

Ironically, it doesn't complain if the address is taken, which is one of the few cases where this would actually matter, since LLVM might not be able to inline a call to the function pointer.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to