[libc-commits] [PATCH] D75393: [libc] Add a convenience type spec for _Noreturn.

Alex Brachet via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Feb 28 19:08:56 PST 2020


abrachet added a comment.

This is helpful for D74949 <https://reviews.llvm.org/D74949>, but `_Noreturn` is not recognized by C++ compilers, a solution is to include <stdnoreturn.h> which will define `noreturn` only as `_Noreturn` for C. So using `NoReturn` would also require we make sure include <stdnoreturn.h> which is possible but perhaps not ideal.

Do we have any obligation to support prior to C11? If so then <stdnoreturn.h> would not be an option we would just have to make our own header, which is not difficult.

It's worth mentioning that a quick test on compiler explorer of MSVC suggests that they don't support _Noreturn or stdnoreturn.h even with `-std=c11`, but I don't think the burden should be on us to work around non conforming compilers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75393





More information about the libc-commits mailing list