This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: PATCH to adjust libcpp raw string support for N3077 changes
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Sun, 28 Mar 2010 15:10:39 +0000 (UTC)
- Subject: Re: RFC: PATCH to adjust libcpp raw string support for N3077 changes
- References: <4BAD2AE6.7060103@redhat.com> <Pine.LNX.4.64.1003270012550.17487@digraph.polyomino.org.uk> <4BAEC139.2010003@redhat.com>
On Sat, 27 Mar 2010, Jason Merrill wrote:
> On 03/26/2010 08:24 PM, Joseph S. Myers wrote:
> > On Fri, 26 Mar 2010, Jason Merrill wrote:
> >
> > > At the Pittsburgh meeting earlier this month, the committee approved
> > > several
> > > significant changes to raw strings:
> >
> > Where is the document specifying these changes? I don't think the patch
> > can be reviewed without it.
>
> Ah yes, I meant to attach it. Done.
Thanks.
The first patch is OK. I think the code changes in the second patch are
OK, but it needs extra testcases for the consequences of the model that
trigraphs and backslash-newline sequences are replaced for the purpose of
delimiting the raw string token but then those changes are reversed
afterwards, if there aren't already such testcases in the testsuite:
* Trigraphs and backslash-newline may be used in the beginning and ending
d-char-sequences, with the source code characters before the replacements
not necessarily being the same in the beginning and ending sequences.
* ??( in the opening d-char-sequence is a trigraph for [ rather than being
?? at the end of the d-char-sequence followed by the ( before the
r-char-sequence.
* ??) followed by the opening d-char-sequence and " does not serve to end
the string because it is a trigraph at this lexical stage and ends up as
literal ??) in the raw string.
I expect these cases to work with the current implementation - but I think
they need testcases.
I would not expect the testcase change to need to add -trigraphs to
dg-options; -std=c++0x automatically enables trigraphs.
--
Joseph S. Myers
joseph@codesourcery.com