This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45399] [C++0x] Warning for \0 in raw strings
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 8 Nov 2010 18:31:53 +0000
- Subject: [Bug c++/45399] [C++0x] Warning for \0 in raw strings
- Auto-submitted: auto-generated
- References: <bug-45399-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45399
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-08 18:31:47 UTC ---
(In reply to comment #5)
> As you can see, I somehow believe that "\n" and "\r" are not interpreted
> correctly and replace these (should it be necessary, at least at one time it
> was?) and then added the same for chr(0) later on.
There's no need to replace newlines. There's only a need to replace nuls to
avoid a warning. Carriage returns in the source code seem to get stripped from
the raw string.
> And the intention of a C++ feature, since when did it ever come to limit its
> use?
Agreed, I was just answering your question "What else is the purpose of raw
strings other than to contain binary blobs?"