[ET Trac] [Einstein Toolkit] #1186: Provide a version of CCTK_WARN which never returns

Einstein Toolkit trac-noreply at einsteintoolkit.org
Tue Nov 27 07:39:40 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:     
Resolution:               |    Keywords:     

Comment (by knarf):

 I would probably omit the do-while (only using a pair of {}):

 #define CCTK_VError(...)     \
 {                             \
   CCTK_VWarn(0,__VA_ARGS__); \
   exit(0);                   \

 As to the attribute: we could set it but we otherwise often try to conform
 to standards most of the time, and IMHO we should if we can. I am not sure
 if all 'important compilers' support this attribute and before we use it
 we should be sure that all do. Then of course we might hit the problem
 that codes already using


 could produce a warning that the call to exit cannot be reached if a
 compiler suddenly knows that CCTK_WARN will not return. :)

Ticket URL: <https://trac.einsteintoolkit.org/ticket/1186#comment:8>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit

More information about the Trac mailing list