printinfo: display version of correct compiler if CC does not point to gcc

[skip ci]