# nvcc preprocessing

**URL:** <https://forums.developer.nvidia.com/t/nvcc-preprocessing/64939>\
**Category:** CUDA Programming and Performance\
**Created:** [September 10, 2018, 11:43am UTC](https://forums.developer.nvidia.com/t/nvcc-preprocessing/64939 "2018-09-10T11:43:57Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![eldienerlee](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@eldienerlee](https://forums.developer.nvidia.com/u/eldienerlee)\
**Post date:** [September 10, 2018, 5:59pm UTC](https://forums.developer.nvidia.com/t/nvcc-preprocessing/64939/7 "2018-09-10T17:59:01Z")

</div>

Are you saying that nvcc always does the C/C++ preprocessing rather than the host compiler, but since it knows the host compiler it attempts to emulate the host compiler’s conformance to the C/C++ preprocessor ?

That emulation seems like much work rather than let the host compiler handle the C/C++ preprocessor. On Windows Visual C++ is the host compiler and emulating the non-standard C/C++ preprocessor of Visual C++ is quite a task, and certainly has very little to do with the C/C++ preprocessor standard at any C++ level.

Does this emaulation of the host compiler’s C/C++ preprocessing change at all between a .cu file, with device and host code, and a normal C/C++ file ?

---

_[View the full topic](https://forums.developer.nvidia.com/t/nvcc-preprocessing/64939)._
