This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Trigraph warnings broken
- To: Martin Buchholz <martin at xemacs dot org>
- Subject: Re: Trigraph warnings broken
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Thu, 27 Jan 2000 23:19:45 -0800
- Cc: bug-gcc at gnu dot org, Eric Christopher <echristo at cygnus dot com>
- References: <14481.5483.270481.527121@gargle.gargle.HOWL>
My work e-mail address is <zack@wolery.cumb.org>. Please do not send
gcc-related mail to <zack@rabi.columbia.edu>.
On Thu, Jan 27, 2000 at 08:04:59PM -0800, Martin Buchholz wrote:
> Compiling XEmacs 21.2 CVS with egcs-20000124, --enable-cpplib:
>
> /xemacs/ws/dev/src/regex.c:533:43: warning: trigraph ??' encountered
> /xemacs/ws/dev/src/regex.c:535:67: warning: trigraph ??' encountered
>
> First of all, it's _very_ nice that gcc has started printing column
> numbers for warnings messages. However....
>
> The column number in that message is correct, but the line number is
> WRONG - not even close - the correct line number is 2061.
I know it sometimes gets the line numbers wrong, but I've never seen
it be off by that much. Are \-newlines used frequently in that file?
Are there stray ^M (0x0d) characters in there anywhere?
BTW, if you can find a short (<100 line) case that triggers a warning
message from the compiler proper with the wrong line number, please
send it to me. I've been trying to find that bug for months.
> Furthermore, gcc should NOT warn about trigraphs used inside comments
> unless the pathological use of a trigraph would change the end of the
> comment
I agree, and I intend to fix this in the near future. Unfortunately,
the way it's implemented right now is that trigraph conversion and
warnings happen in a totally separate pass over the file before
anything else happens. That pass doesn't know anything about
comments. (It also has its own notion of the current line number,
which is probably how it managed to be off by 1500 lines.)
You can shut it up with -Wno-trigraphs if it's too noisy.
zw