[clang] [llvm] [clang][RISCV][Zicfilp] Emit RISCV function-signature-based CFI label in llvm::Function metadata (PR #111661)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 21:49:03 PDT 2025
efriedma-quic wrote:
There are intentional tradeoffs here, for the ABI, which should be made carefully; in some cases, it might be the right tradeoff to reject standard-compliant code. If you've considered it, I guess I won't object. I can't find any discussion of it, though.
If we're intentionally going this route, I'd like to see appropriate diagnostics, yes.
For unprototyped signatures specifically, it's probably simpler to just require users to upgrade to -std=c23/-std=gnu23, as opposed to replicating the existing diagnostics.
--------------
> I think "function definitions which aren't compatible with the corresponding function declaration" is an error and should already be diagnosed? Do you mean "functions which aren't compatible with the corresponding function pointer variable declaration"?
I meant something like my example https://github.com/llvm/llvm-project/pull/111661#discussion_r2096427699 . Diagnosing implicit function pointer casts is probably also useful.
https://github.com/llvm/llvm-project/pull/111661
More information about the llvm-commits
mailing list