This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Trigraph warnings broken


>>>>> "Z" == Zack Weinberg <zack@wolery.cumb.org> writes:

Z> My work e-mail address is <zack@wolery.cumb.org>.  Please do not send
Z> gcc-related mail to <zack@rabi.columbia.edu>.

Z> 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.

Z> I know it sometimes gets the line numbers wrong, but I've never seen
Z> it be off by that much.  Are \-newlines used frequently in that file?

Yes.

Z> Are there stray ^M (0x0d) characters in there anywhere?

No.

Z> BTW, if you can find a short (<100 line) case that triggers a warning
Z> message from the compiler proper with the wrong line number, please
Z> send it to me.  I've been trying to find that bug for months.

I'll keep my eyes open.

>> Furthermore, gcc should NOT warn about trigraphs used inside comments
>> unless the pathological use of a trigraph would change the end of the
>> comment

Z> I agree, and I intend to fix this in the near future.  Unfortunately,
Z> the way it's implemented right now is that trigraph conversion and
Z> warnings happen in a totally separate pass over the file before
Z> anything else happens.  That pass doesn't know anything about
Z> comments.  (It also has its own notion of the current line number,
Z> which is probably how it managed to be off by 1500 lines.)

Z> You can shut it up with -Wno-trigraphs if it's too noisy.

I'll change the comment in our sources to not use trigraphs, so it's
not a problem for me anymore.  Still, it would be good to fix the
compiler too.

Now to teach Emacs about the new column number syntax...

Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]