rsmith added a comment. Another possibility would be to add a command-line argument to set the version of GCC that clang pretends to be. We have a similar mechanism for our MSVC compatibility mode already. Repository: rC Clang https://reviews.llvm.org/D51011