move clang warning where it can use detected CC, fix #1696