This is the mail archive of the gcc@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: warning: trigraph ... ignored


Zack Weinberg writes:
> On Wed, Jun 14, 2000 at 12:46:00AM +0100, Nix wrote:
> > Thorsten Kranzkowski <th@Marvin.DL8BCU.ampr.org> writes:
> > > I don't exactly know what trigraphs are, I assume some weird replacement
> > > expression for unusual characters. But I don't think gcc should warn about 
> > > them in _comments_ !
> > 
> [snip excellent explanation]

Why, thank you :) I was just trying to take some load off you (who
normally explains these things); after all, you have the new
preprocessor to write, you don't have time to explain the infelicities
of the old one to all and sundry :)

> All that you say is true - but I want to add that there is no good
> reason for us to warn about trigraphs inside comments that don't
> affect where it starts or ends.  E.g. if you write

I *thought* that was odd, but I thought there might be a political
reason. i.e. `trigraphs suck so we should deprecate them and warn about
them at every opportunity'. (The entirely correct comment in the gcc
manual under -trigraphs also tends to support this view.)

Of course, inside a comment trigraphs're *likely* to be harmless, but
??/ in particular might have unexpected effects. However, the case in
which it does is so rare and contrived that we can probably ignore it.

> /* asm-???/delay.h */
> 
> the program has the same meaning whether or not the trigraph is
> converted.  We still warn about that because the part of cpp that does
> trigraph conversion doesn't know anything about comments.

Ahh. I see.

-- 
> ... knowing the alignment of Orcs in AD&D.
Doubleword.
  --- David Jacoby and Greg Andrews in the Monastery

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