[cfe-dev] Overeager -Wswitch

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Sat Oct 10 04:33:58 PDT 2015


On Sat, Oct 10, 2015 at 10:21:17AM +0200, Kim Gräsman via cfe-dev wrote:
> Alternatively, if we could get a patch into Poco, is there something
> like MSVC's #pragma(warning:disable) for Clang, so they could
> selectively silence the warning around this function?

add GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch"
... your function here...
#pragma GCC diagnostic pop

I think it also works with clang as pragma group.

Joerg



More information about the cfe-dev mailing list