Protect gcc diagnostic pragmas with gcc version

Versions prior to 4.6 didn't allow gcc diagnostic pragmas with push
and pop and to appear anywhere in the file.  Just let the warning be
there for those versions.
Add explicit int to double cast
Update 4.2.0 target