From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19188 invoked by alias); 12 Oct 2009 20:20:41 -0000 Received: (qmail 19179 invoked by uid 22791); 12 Oct 2009 20:20:40 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Oct 2009 20:20:37 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9CKKZD2024089 for ; Mon, 12 Oct 2009 16:20:36 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9CKKYI2016992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Oct 2009 16:20:35 -0400 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.2/8.14.2/Submit) id n9CKKYk8022627; Mon, 12 Oct 2009 22:20:34 +0200 Date: Mon, 12 Oct 2009 20:21:00 -0000 From: Jakub Jelinek To: Tom Tromey Cc: Jakub Jelinek , gcc-patches@gcc.gnu.org Subject: Re: Patch ping Message-ID: <20091012202034.GP14664@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20091012122237.GJ14664@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg00792.txt.bz2 On Mon, Oct 12, 2009 at 01:20:36PM -0600, Tom Tromey wrote: > I read the patch. Sorry about the delay -- these days my attention > wanders a lot so pings for libcpp patches are very helpful. Thanks. > I didn't see anything limiting this to C++0x, but I suppose that will be > done outside libcpp. > > The patch refers to `CPP_OPTION (pfile, uliterals)' but I didn't see an > addition to struct cpp_options. Both of the above questions are related. It is uliterals that limits this to C++0x and GNUC99, and that wasn't added because it is already pre-existing. Before this patch it was used to limit u"", U"", u'x', U'x', now it guards also u8"", R"[]", LR"[]", uR"[]", UR"[]" and u8R"[]" style strings. See init.c (lang_defaults). > Would it be too much trouble to use calls to cpp_error_with_line for all > new errors? I think this is generally preferable, and in this code I > think it would also let us emit errors against locations inside strings. > (And, for errors about unterminated strings, it would let us point to > the start of the string, which seems better to me.) > > lex_raw_string uses _cpp_get_fresh_line, failing if that returns false. > _cpp_get_fresh_line will always return false inside of a directive -- do > we care about raw strings containing newlines in directives? I'll look at these 2 tomorrow. > +/* Lexes raw a string. The stored string contains the spelling, including > > I think the first sentence should be "Lexes a raw string". Fixed in my copy. > >From _cpp_lex_direct: > > + case 'R': > /* 'L', 'u' or 'U' may introduce wide characters or strings. */ > > This comment needs an update. Likewise. > This isn't part of libcpp, but it seems to me that C_LEX_RAW_STRINGS is > now confusingly named. True, perhaps C_LEX_STRING_NO_TRANSLATE_NO_JOIN or just C_LEX_STRING_NO_JOIN will need to be used instead. Jakub