In linux, my g++ ( g++ (GCC) 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1) ) man page says:
-fmessage-length=n
Try to format error messages so that they fit on lines of about n
characters. The default is 72 characters for g++ and 0 for the
rest of the front ends supported by GCC. If n is zero, then no
line-wrapping will be done; each error message will appear on a
single line.
As such, I suggest you add "-fmessage-length=0" as a default flag for the gcc compiler, since your error-finding regexps don't work very well when the error messages wrap.