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: backslash-newline, trigraphs, and the C standard



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

> On Wed, Jan 12, 2000 at 08:59:23PM -0800, Mark Mitchell wrote:
> > >>>>> "Jeffrey" == Jeffrey A Law <law@cygnus.com> writes:
> > 
> >     Jeffrey>   In message <20000111225102.A20712@wolery.cumb.org>you
> >     Jeffrey> write:
> >     >> So - I'd like to change it so that, in nonconforming mode,
> >     >> \-newline is replaced by (virtual) white space except inside
> >     >> strings.
> > 
> >     Jeffrey> I can live with it so long as we can still get conforming
> >     Jeffrey> code via some switch.
> > 
> > FWIW, I'm not in favor of this idea.  This is a change that can result
> > in silent changes in program behavior.  Extensions are one thing;
> > silent changes are another.
> > 
> > There are certainly compilers that compile faster, generate better
> > code than GCC, and are ANSI/ISO conforming so there must be other
> > places to look to speed up the compiler.
> 
> Performance is not the main reason why I want to make this change; it's
> to be able to silence trigraph warnings in comments.  There are definitely
> better places to look for performance improvements.

I thought the point of the trigraph warnings is so that when you
accidentally write a trigraph, use gcc, and then have to port to some
compiler that has trigraphs on by default, you don't get a nasty shock.

In that case, aren't trigraphs that would end comments particularly
interesting?

I think, though, that gcc should not warn for things like

/* some comment (??) */

because they don't change the meaning of the code; whether trigraphs
are used or not, it's still a comment.

I don't know how easy it would be to do that in cpplib, it looks like
it might be quite a bit of work.

-- 
- Geoffrey Keating <geoffk@cygnus.com>

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