#1186: Provide a version of CCTK_WARN which never returns --------------------------+------------------------------------------------- Reporter: hinder | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by knarf):
I don't understand your comment about VError and the noreturn attribute. The idea of that macro is to be variadic, much like CCTK_VWarn already is - to be able to compose nice error messages depending on something dynamic. It wouldn't change anything about the noreturn attribute.
Currently CCTK_WARN a function (through a #define). CCTK_ERROR (and CCTK_VError) could be the same, but could also contain (within a block) a call to exit - something a compiler hopefully sees as 'noreturn' without even using that attribute. That call wouldn't ever be executed ...