[ET Trac] [Einstein Toolkit] #1186: Provide a version of CCTK_WARN which never returns
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Mon Nov 26 06:09:30 CST 2012
#1186: Provide a version of CCTK_WARN which never returns
-------------------------+--------------------------------------------------
Reporter: hinder | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: Cactus | Version:
Keywords: |
-------------------------+--------------------------------------------------
CCTK_WARN(0,...) always causes a fatal abort, but the compiler does not
know this. Hence, it incorrectly warns that variables might be used
without being set because it doesn't know that the only path that doesn't
set them terminates the program. I propose introducing a new function
CCTK_WARN_ABORT(...) which calls CCTK_WARN(0,...) and is declared with the
attribute noreturn (http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Function-
Attributes.html) so that the compiler knows that it can never return, and
does not make incorrect conclusions when computing variable dependencies
(CCTK_Abort is already defined without an error message).
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1186>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list