public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Neil Booth <neil@daikokuya.co.uk>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: preprocessor/10614: -Wtrigraphs does not catch // ??/
Date: Sun, 04 May 2003 09:56:00 -0000	[thread overview]
Message-ID: <20030504095604.18842.qmail@sources.redhat.com> (raw)

The following reply was made to PR preprocessor/10614; it has been noted by GNATS.

From: Neil Booth <neil@daikokuya.co.uk>
To: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
Cc: gcc-bugs@gcc.gnu.org, Zack Weinberg <zack@codesourcery.com>,
	gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/10614: -Wtrigraphs does not catch // ??/
Date: Sun, 4 May 2003 10:52:12 +0100

 Hallvard B Furuseth wrote:-
 
 > neil@gcc.gnu.org writes:
 > >     Not a bug.  -Wcomment(s) does what you want.
 > 
 > Sorry, no.  What I want is for -Wtrigraphs to warn about code that will
 > compile differently with and without trigraph support.  However,
 
 Ah, I see.
 
 That is quite a strict condition, and not one I'm willing to implement
 because of the cost and ugliness of the checks in C comments.
 For example, we turn off -Wtrigraphs in comments because that is what
 many people have requested, but IMO adding a lot of code to warn that
 an instance of ??/\n, or multiple thereof, that happen to be preceded by
 '*' and followed by '/' and would therefore terminate a C block comment
 is unreasonable, but does lead to differing behaviour with and without
 -trigraphs.
 
 > - The warning from gcc -trigraphs -Wcomments gives no indication of
 >   this; it could come from a `//..\' line.
 > 
 > - The warning is only given when -trigraphs or -std=c99 is given.
 >   So if I just compile with 'gcc -Wcomments', I'll get no clue that the
 >   program will silently compile differently on an ISO C compiler.
 
 You could persuade me that it's worthwhile warning for ??/ followed by
 a newline in any kind of comment with -Wtrigraphs.  This would be
 fairly simple to implement, and would mean that -Wtrigraphs warns about
 all program-changing behaviour.  In addition, it would warn about ??/
 followed by a newline in C block comments that don't change behaviour,
 but I don't think that would bother those who want trigraph warnings
 off in comments.
 
 Is that an acceptable compromise?
 
 Neil.


             reply	other threads:[~2003-05-04  9:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-04  9:56 Neil Booth [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-04 10:26 Hallvard B Furuseth
2003-05-04  9:26 Hallvard B Furuseth
2003-05-04  9:05 neil
2003-05-03 23:36 Hallvard B Furuseth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030504095604.18842.qmail@sources.redhat.com \
    --to=neil@daikokuya.co.uk \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).