NVIDIA / NVTX

The NVIDIA® Tools Extension SDK (NVTX) is a C-based Application Programming Interface (API) for annotating events, code ranges, and resources in your applications.
Apache License 2.0
312 stars 48 forks source link

Compilation error when if `NVTX_DISABLE` is defined #38

Closed AntoineFroger closed 3 years ago

AntoineFroger commented 3 years ago

The following code fails to compile with GCC 8.4.0.

#define NVTX_DISABLE
#include <nvtx3/nvtx3.hpp>
int main() {}

Compilation error:

/home/afroger/dev/projects/NVTX/cpp/include/nvtx3/nvtx3.hpp: In function ‘nvtx3::v1::range_handle nvtx3::v1::start_range(const Args& ...)’:
/home/afroger/dev/projects/NVTX/cpp/include/nvtx3/nvtx3.hpp:1979:9: error: ‘first’ was not declared in this scope
   (void)first;
         ^~~~~