Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22016

C++ NVCC/gcc disable ALL warning for some lines of code? [duplicate]

$
0
0
  __host__ __device__    inline uint32_t __attribute__((always_inline)) RowMajorMatrixIndexer32(      uint32_t row, uint32_t col,      uint32_t nrow, uint32_t ncol) {    return row * ncol + col;  }  __host__ __device__  inline uint32_t __attribute__((always_inline)) ColMajorMatrixIndexer32(      uint32_t row, uint32_t col,      uint32_t nrow, uint32_t ncol) {    return col * nrow + row;  }

I have 2 functions like above: both have the same interface (for template purposes) that takes 4 numbers, but only use 3 of them.My compiler keeps giving me this warning even if I use the above pragma commands to disable it.

main.cu(124): warning: parameter "nrow" was declared but never referenced

This "error" is intentional. How can I disable ALL warnings between a block of code?


Viewing all articles
Browse latest Browse all 22016

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>