--cc=: make GNU_GCC checks stricter

Fixes #30668