Bug in the nvcc, associated with forced adding compile options -EHsc

NVCC (CUDA 5.0/5.5) forcibly adds compile option -EHsc, which is then used for the host and the device code, which is not always the best choice. Especially given the fact that it can not be reset or replaced.

You can reset / remove the option of CUDA compilation rules, but it unfortunately does not help, NVCC still continues to set this option, but only in a.res files.

Here is an example of kernel.cu.obj.res file: -nologo -c -TP /EHa /W3 /nologo /Od /Zi /RTC1 /MTd /GR -EHsc -I"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.5/include" “-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/…/include” -EHsc “kernel.cu.cpp.ii”

Maybe someone has the opportunity to write a bug report developers of NVCC?


It’s not clear to me that there is a bug (= things do not work as designed). This looks more like an enhancement request to allow programmers to override the exception handling behavior specified for the host compiler?

Bug reports and enhancement requests can be filed using the bug reporting form linked from the registered developer website. Please prefix the synopsis of any enhancement requests with “RFE:” (for “request for enhancement”) so they are easily distinguishable from actual bugs. Thank you.

Thanks for the help, I’ll try to do as you said.