How to disable a specific nvcc compiler warnings

前端 未结 6 1608
无人及你
无人及你 2020-12-08 11:45

I want to disable a specific compiler warning with nvcc, specifically

warning: NULL reference is not allowed

The co

6条回答
  •  死守一世寂寞
    2020-12-08 11:55

    To augment user2333829's answer: if you know the warning name you can disable it like this:

    -Xcudafe "--diag_suppress=boolean_controlling_expr_is_constant"
    

    If you don't know the name, get warning numbers by compiling with:

    -Xcudafe --display_error_number
    

    And then with:

    -Xcudafe --diag_suppress=
    

    (Note: both options at the same time apparently don't work.)

提交回复
热议问题