From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61880 invoked by alias); 8 Jul 2015 14:50:23 -0000 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 Received: (qmail 61754 invoked by uid 89); 8 Jul 2015 14:50:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Jul 2015 14:50:20 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZCqfv-0004Mj-M7 from Thomas_Schwinge@mentor.com ; Wed, 08 Jul 2015 07:50:16 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Wed, 8 Jul 2015 15:50:14 +0100 From: Thomas Schwinge To: David Malcolm , Jeff Law , Subject: Re: [PATCH 2/4 v2: part 2] libcpp: Replace macro usage with C++ constructs In-Reply-To: <1430850074-40522-3-git-send-email-dmalcolm@redhat.com> References: <5547C538.5000606@redhat.com> <1430850074-40522-1-git-send-email-dmalcolm@redhat.com> <1430850074-40522-3-git-send-email-dmalcolm@redhat.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) Date: Wed, 08 Jul 2015 14:50:00 -0000 Message-ID: <874mle66vz.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2015-07/txt/msg00613.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 2660 Hi! On Tue, 5 May 2015 14:21:13 -0400, David Malcolm wro= te: > libcpp/ChangeLog: > * include/line-map.h (MAX_SOURCE_LOCATION): Convert from a macro > to a const source_location. > (RESERVED_LOCATION_COUNT): Likewise. > [...] > --- a/libcpp/include/line-map.h > +++ b/libcpp/include/line-map.h > /* This is the highest possible source location encoded within an > ordinary or macro map. */ > -#define MAX_SOURCE_LOCATION 0x7FFFFFFF > +const source_location MAX_SOURCE_LOCATION =3D 0x7FFFFFFF; > /* source_location values from 0 to RESERVED_LOCATION_COUNT-1 will > be reserved for libcpp user as special values, no token from libcpp > will contain any of those locations. */ > -#define RESERVED_LOCATION_COUNT 2 > +const int RESERVED_LOCATION_COUNT =3D 2; That's not quite what the ChangeLog says ;-) -- now committed in r225558, as obvious: commit a5ea4da319fa2c7e9dd28e86bb69637a82e8e551 Author: tschwinge Date: Wed Jul 8 14:48:11 2015 +0000 Address -Wsign-compare diagnostics =20=20=20=20 ... which have been introduced in r223152, for example hundreds of: =20=20=20=20 [...]/gcc/input.h:37:12: warning: comparison between signed and uns= igned integer expressions [-Wsign-compare] =20=20=20=20 libcpp/ * include/line-map.h (RESERVED_LOCATION_COUNT): Change type to source_location. =20=20=20=20 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225558 138bc75d-0d04-04= 10-961f-82ee72b054a4 --- libcpp/ChangeLog | 5 +++++ libcpp/include/line-map.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git libcpp/ChangeLog libcpp/ChangeLog index 2d2893e..e72b535 100644 --- libcpp/ChangeLog +++ libcpp/ChangeLog @@ -1,3 +1,8 @@ +2015-07-08 Thomas Schwinge + + * include/line-map.h (RESERVED_LOCATION_COUNT): Change type to + source_location. + 2015-07-02 Paolo Carlini =20 PR preprocessor/53690 diff --git libcpp/include/line-map.h libcpp/include/line-map.h index 4155156..bc747c1 100644 --- libcpp/include/line-map.h +++ libcpp/include/line-map.h @@ -870,7 +870,7 @@ bool linemap_location_from_macro_expansion_p (const str= uct line_maps *, /* source_location values from 0 to RESERVED_LOCATION_COUNT-1 will be reserved for libcpp user as special values, no token from libcpp will contain any of those locations. */ -const int RESERVED_LOCATION_COUNT =3D 2; +const source_location RESERVED_LOCATION_COUNT =3D 2; =20 /* Converts a map and a source_location to source line. */ inline linenum_type Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVnTigAAoJEK3/DN1sMFFtXnsH/3MJSa8VwK9OOKtFO6nrMd2s lOv6Wram18ogFNrou46XJVT5tTOiMTZrBg23AKa1hX9cwa73ZEjkv6sONa0OgCYk OfeHBR56Ltx0l7xRBW7qZ619btfUXMPzCcr9U+ULw3sJ04ce36uUG0dMhlUWWEez NGOHCYw/bofcqxmuYLVSVk0p5WUkVOY81PgWckWgGi5joYmLdLO0hTGuM4i90viO aHSwd0fkYD+VdjsaHea/2iR4p6/SMtoCQMm1XiAERPbh+RF+IaAR6bigoe0zsDWj qkn3BmCBOUFypbGuC8immI+6//eMh7t6O6agv9T9CxbR3Kou1DzODJXU+G67okg= =DdOT -----END PGP SIGNATURE----- --=-=-=--