util: fix unknown pragma warning on msvc
MSVC has no idea about these pragmas, and spews warnings about them, making it hard to spot real problems. So let's only use these macros on GCC.
Fixes: 2ec290cd ("util: Fix/silence variable shadowing warnings")