[cfe-commits] r167359 - /cfe/trunk/unittests/Lex/PPCallbacksTest.cpp
Dmitri Gribenko
gribozavr at gmail.com
Sat Nov 3 14:21:54 PDT 2012
On Sat, Nov 3, 2012 at 11:18 PM, Benjamin Kramer <benny.kra at gmail.com> wrote:
> On 03.11.2012, at 22:10, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>> Is this correct? IIRC, "\?" is not a correct escape sequence. The
>> correct way is to split the trigraph across multiple string literals
>> and rely on concatenation: "?" "?-"
>
> I don't see why \? shouldn't be valid. It's listed in C11 6.4.4.4p3 and C++11 [lex.ccon]. Haven't checked older revisions of the standards but it would surprise me if this changed recently.
You are right, sorry for the noise. I wrote that from memory --
should have checked the standard.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list