Fix warning and optimization flags for GCC.

Fixed the warning level and optimization flags for the GCC compiler.