title: CUDA compiler warning about unrecognized GCC pragma
body: <p>There is some C++ code in a CUDA file that uses this pragma:</p>
  
  <pre><code>#pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wunused-result"
      void foobar()
      {
          // some code
      }
  #pragma GCC diagnostic pop
  </code></pre>
  
  <p>When this CUDA file is compiled using CUDA 5.5 nvcc compiler, the host compiler stage is fine, but the device compiler stage produces this warning:</p>
  
  <pre><code>foobar.cu(420): warning: unrecognized GCC pragma
  </code></pre>
  
  <p>It looks like the CUDA compiler understands that this is a GCC pragma. I have no idea why it is trying to understand all GCC pragmas. Is there any method to fix this warning or make this warning go away?</p>
  
  <p>Update: Please note that passing the <code>-Xcudafe "--diag_suppress=unrecognized_pragma"</code> option to the nvcc compiler does not seem to have any effect.</p>