Bug 729001 - Work around warnings invalid for C++
C++: Fix compiler warnings from gcc-4.7 on Fedora 18

Clang didn't complain about these. Note that some of the error messages
for not-clang in the tests have changed, likely due to C++. The old ones
are commented out for now; this part needs to be tested with an older
gcc to see if it's consistent.