3

Visual Studio provides #pragma warning in the source to suppress the warnings.

Does gcc provide similar feature? I found that I can use -fdiagnostics-show-option to know how to get the option to disable the warning, and use command line to suppress warning, but I'd like to use pragma if it's possible.

prosseek
  • 182,215
  • 215
  • 566
  • 871
  • +1 because it was the top Google answer for my search. It is a duplicate of the question mentioned by Sibshops however. – pesche Nov 06 '12 at 15:59
  • Questieon was about g++ but answer is about gcc. g++ gives me ignored pragmas for the selected answer – Eric May 27 '16 at 05:12
  • There's an ongoing bug for g++ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431 – Eric May 27 '16 at 05:13

0 Answers0