Fix some GCC warnings by actually testing the types generated.
Suppress spurious GCC warning.
Fixes for msvc-13.