leezu opened a new pull request #17509: Enforce DMLC_LOG_FATAL_THROW
URL: https://github.com/apache/incubator-mxnet/pull/17509
 
 
   ## Description ##
   Fixes https://github.com/apache/incubator-mxnet/issues/13956
   
   ### Changes ###
   - [X] Fix calling abort() on newer compilers
   
   ## Comments ##
   > After all replacements due to macro expansion and the defined unary 
operator have been performed, all remaining identifiers and keywords, except 
for true and false, are replaced with the pp-number 0
   
   https://stackoverflow.com/a/5085425/2560672
   
   Current assumption is that `DMLC_LOG_FATAL_THROW` needs to be explicitly set 
to 0 to enable 0, but this assumption is false. Rather, if 
`DMLC_LOG_FATAL_THROW` is unset, `DMLC_LOG_FATAL_THROW == 0` will evaluate true 
during preprocessing at least if the preprocessor implements the standard 
correctly. Some older preprocessors may not have conformed to standard and this 
logic may have thus appeared to work.
   
   It certainly does not work on GCC7 or Clang 9..
   
   Further fix the use of an undefined macro `DMLC_THROW_EXCEPTION` in 
`3rdparty/mshadow/mshadow/logging.h`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to