From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20609 invoked by alias); 23 Apr 2011 09:16:21 -0000 Received: (qmail 20599 invoked by uid 22791); 23 Apr 2011 09:16:21 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 Apr 2011 09:16:07 +0000 From: "kayhayen at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/48740] New: Raw C++0x strings and trigraphs mix badly X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kayhayen at gmx dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 23 Apr 2011 09:16:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg02415.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48740 Summary: Raw C++0x strings and trigraphs mix badly Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: kayhayen@gmx.de Created attachment 24078 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24078 One liner with constant demonstrating the error. Hello there, my file has just one line: char const *R = "raw(foo%sbar%sfred%sbob?????)raw"; This is supposed to work, but gives: g++-4.6 -c -std=c++0x -Wall -Werror something.build/__constants.cpp something.build/__constants.cpp:2:44: error: trigraph ??) converted to ] [-Werror=trigraphs] cc1plus: all warnings being treated as errors Adding a space before the closing ")" of the raw string gives me no problem at all. I have had instances where the compiler complained about an unterminated strings constant after shuffling raw strings around. Having multiple raw strings in my file, separated by raw()raw each, it seems, I had the case, where a raw constant would eat up towards the next, very unpleasant. Question: Are trigraphs still in C++0x, are they supposed to be applied to raw strings too? How can I disable trigraphs. I only found an option to enable it, and a reference that -std would. Note: I really want to use raw strings to encode arbitrary data for my Python compiler. I truly need a way to avoid trigraphs. So please remove trigraphs from the C++0x case, or add an option to disable them. Yours, Kay Hayen