Fix Windows compilation in debug mode.
Some GCC versions disallow #pragma inside function body.
Merge pull request #1852 from jimis/cfupgrade

Some GCC versions disallow #pragma inside function body.