Pass same flags to PCH compile as C/C++ source code

--HG--
extra : rebase_source : 0ea3b462b0765fa0202bba5c6934acd9ce23b2e7
Set default language earlier, to avoid out of scope warnings

--HG--
extra : rebase_source : 1f7eabb2a525f79dbc75b6dbdf333352ba9c0e39
Fix error handling in remove() deprecation path