[PATCH] D131351: [C] Default implicit function pointer conversions diagnostic to be an error
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 12 04:32:50 PDT 2022
mizvekov added a comment.
In D131351#3718725 <https://reviews.llvm.org/D131351#3718725>, @aaron.ballman wrote:
> However, we don't care about the type mismatch when doing a redeclaration or when dropping the attribute, as in:
>
> __attribute__((noreturn)) void my_exit(void);
> void (*handler)(void) = my_exit; // Silently drops the attribute
>
> _Noreturn void my_exit(void) { // No concerns about the type mismatch on redeclaration because we inherit __attribute__((noreturn))
> }
>
> so maybe we shouldn't worry about it here.
Are you sure? If the function types don't match in C++, I would expect that to become a different overload, not a redeclaration, right?
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