[PATCH] D131351: [C] Default implicit function pointer conversions diagnostic to be an error

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 12 09:36:59 PDT 2022


aaron.ballman added a comment.

In D131351#3718982 <https://reviews.llvm.org/D131351#3718982>, @mstorsjo wrote:

> A different but slightly similar case, where I've run into these errors too, FWIW: On ARM, when compiling with a hardfloat target, Clang does consider a function pointer with `__attribute__((pcs("aapcs-vfp")))` different from one without, even if the default still in the end would end up equal to it. I guess the problem there is that Clang doesn't know what the default implicit calling convention is (and that's something that ends up resolved on the LLVM side while lowering code) - while e.g. Clang does know that `__cdecl` is equivalent to not declaring any calling convention at all.

I think that one is a bug with the target architecture not properly specifying what the default calling convention is that case. My guess is they're falling back on cdecl as the default calling convention in the frontend when they should be looking at the target.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131351/new/

https://reviews.llvm.org/D131351



More information about the cfe-commits mailing list