cl/gcc: improve the location validity check

... in order to provide more reliable location info with gcc-4.8.0

Reported by: Daniela Ďuričeková