From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7129 invoked by alias); 3 May 2003 23:26:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7086 invoked by uid 71); 3 May 2003 23:26:02 -0000 Date: Sat, 03 May 2003 23:26:00 -0000 Message-ID: <20030503232602.7085.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Neil Booth Subject: Re: preprocessor/10613: Please make -Wtrigraphs the default Reply-To: Neil Booth X-SW-Source: 2003-05/txt/msg00215.txt.bz2 List-Id: The following reply was made to PR preprocessor/10613; it has been noted by GNATS. From: Neil Booth To: Hallvard B Furuseth Cc: gcc-gnats@gcc.gnu.org, Zack Weinberg Subject: Re: preprocessor/10613: Please make -Wtrigraphs the default Date: Sun, 4 May 2003 00:22:21 +0100 Hallvard B Furuseth wrote:- > Gcc *silently* compiles code like `puts("??!")' incorrectly: It > prints `??!' instead of `|'. I agree that not converting > trigraphs is the best default, they are most likely programmer > errors. However, fixing a programmer error without telling the > programmer is very bad, we'll test our code and think it's > correct when it will misbehave with other (correct) compilers. That would be OK with me. What do you think, Zack? There's always -Wno-trigraphs for those who don't want it. > Turn on -Wtrigraphs by default, maybe except if -trigraphs is > given. (I suggest to do so even if -ansi is given, since they > are still probably programmer bugs, but that's less important.) > > BTW, I suggest moving the detailed description of trigraphs from > Info node (gcc)Preprocessor Options to (gcc)C Dialect Options or > to a separate node. They may technically fit better where they > are now, but people are more likely to look at the latter nodes. > And you might add that the fix for unintended trigraphs in string > literals is to split them up from "??!" to "?" "?!". Escaping the 2nd '?' works too. Neil.