public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48740] New: Raw C++0x strings and trigraphs mix badly
@ 2011-04-23  9:16 kayhayen at gmx dot de
  2011-04-23  9:17 ` [Bug c++/48740] " kayhayen at gmx dot de
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: kayhayen at gmx dot de @ 2011-04-23  9:16 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-04-26 10:40 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-23  9:16 [Bug c++/48740] New: Raw C++0x strings and trigraphs mix badly kayhayen at gmx dot de
2011-04-23  9:17 ` [Bug c++/48740] " kayhayen at gmx dot de
2011-04-23 10:22 ` daniel.kruegler at googlemail dot com
2011-04-23 10:30 ` redi at gcc dot gnu.org
2011-04-23 10:55 ` jakub at gcc dot gnu.org
2011-04-23 10:59 ` daniel.kruegler at googlemail dot com
2011-04-23 11:05 ` redi at gcc dot gnu.org
2011-04-23 11:06 ` kayhayen at gmx dot de
2011-04-23 11:14 ` daniel.kruegler at googlemail dot com
2011-04-23 11:25 ` kayhayen at gmx dot de
2011-04-23 11:36 ` redi at gcc dot gnu.org
2011-04-23 11:56 ` jakub at gcc dot gnu.org
2011-04-23 12:34 ` [Bug preprocessor/48740] " jakub at gcc dot gnu.org
2011-04-23 12:34 ` jakub at gcc dot gnu.org
2011-04-23 15:10 ` kayhayen at gmx dot de
2011-04-23 23:32 ` jakub at gcc dot gnu.org
2011-04-23 23:34 ` jakub at gcc dot gnu.org
2011-04-26 10:07 ` jakub at gcc dot gnu.org
2011-04-26 10:40 ` jakub at gcc dot gnu.org

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).