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

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 12 00:59:43 PDT 2022


mstorsjo added a comment.

I found another case of this warning, which is kinda borderline whether it really is an error not:

  #include <stdlib.h>
  static _Noreturn void my_exit(void) {
    exit(42);
  }
  __attribute__((noreturn)) void (*handler)(void) = my_exit;

The fix is simple though, just be consistent with `_Noreturn` vs `__attribute__((noreturn))` on both function and function pointer.


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