How to suppress specific warnings in g++

后端 未结 4 1427
小鲜肉
小鲜肉 2020-12-06 04:03

I want to suppress specific warnings from g++. I\'m aware of the -Wno-XXX flag, but I\'m looking for something more specific. I want some of th

4条回答
  •  执笔经年
    2020-12-06 04:26

    Unfortunately, this feature isn't provided by g++. In VC++, you could use #pragma warning to disable some specific warnings. In gcc, the closest you can have is diagnostic pragmas, which let you enable/disable certain types of diagnostics for certain files or projects.

提交回复
热议问题