samitolvanen added a comment.

In D134831#4137408 <https://reviews.llvm.org/D134831#4137408>, @inglorion wrote:

> Is this intended to warn on code that casts a function taking a pointer to 
> some non-void type to a function that takes a void*?

Yes, this is intended to warn if the function types don't match.

> I didn't see this mentioned in the diff description, comments, or test. Is 
> the behavior intentional? Are these types actually incompatible?

As far as the language is concerned, the types are not incompatible, but 
calling the function pointer would trip `-fsanitize=cfi` checking, which this 
warning is meant to catch. If your program is not using CFI, you may want to 
consider disabling the `-strict` warning.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134831

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to