This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: PATCH to adjust libcpp raw string support for N3077 changes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]