From: Thomas Schwinge <thomas@codesourcery.com>
To: David Malcolm <dmalcolm@redhat.com>, Jeff Law <law@redhat.com>,
<gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/4 v2: part 2] libcpp: Replace macro usage with C++ constructs
Date: Wed, 08 Jul 2015 14:50:00 -0000 [thread overview]
Message-ID: <874mle66vz.fsf@kepler.schwinge.homeip.net> (raw)
In-Reply-To: <1430850074-40522-3-git-send-email-dmalcolm@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2676 bytes --]
Hi!
On Tue, 5 May 2015 14:21:13 -0400, David Malcolm <dmalcolm@redhat.com> wrote:
> 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 = 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 = 2;
That's not quite what the ChangeLog says ;-) -- now committed in r225558,
as obvious:
commit a5ea4da319fa2c7e9dd28e86bb69637a82e8e551
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed Jul 8 14:48:11 2015 +0000
Address -Wsign-compare diagnostics
... which have been introduced in r223152, for example hundreds of:
[...]/gcc/input.h:37:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libcpp/
* include/line-map.h (RESERVED_LOCATION_COUNT): Change type to
source_location.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225558 138bc75d-0d04-0410-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 <thomas@codesourcery.com>
+
+ * include/line-map.h (RESERVED_LOCATION_COUNT): Change type to
+ source_location.
+
2015-07-02 Paolo Carlini <paolo.carlini@oracle.com>
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 struct 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 = 2;
+const source_location RESERVED_LOCATION_COUNT = 2;
/* Converts a map and a source_location to source line. */
inline linenum_type
Grüße,
Thomas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
next prev parent reply other threads:[~2015-07-08 14:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-02 0:44 [PATCH 0/4] libcpp patches David Malcolm
2015-05-02 0:44 ` [PATCH 1/4] libcpp: Improvements to comments in line-map.h/c David Malcolm
2015-05-04 17:18 ` Jeff Law
2015-05-02 0:44 ` [PATCH 2/4] libcpp: Replace macro usage with C++ constructs David Malcolm
2015-05-04 19:15 ` Jeff Law
2015-05-05 18:08 ` [PATCH 2/4 v2] libcpp: Replace macro usage with C++ constructs) David Malcolm
2015-05-05 18:08 ` [PATCH 5/4] libcpp: Eliminate most of the non-const/reference-returning inline fns David Malcolm
2015-05-08 21:49 ` Jeff Law
2015-05-05 18:08 ` [PATCH 2/4 v2: part 1] Move linemap_assert higher up within the file David Malcolm
2015-05-08 21:35 ` Jeff Law
2015-05-05 18:08 ` [PATCH 2/4 v2: part 2] libcpp: Replace macro usage with C++ constructs David Malcolm
2015-05-08 21:47 ` Jeff Law
2015-07-08 14:50 ` Thomas Schwinge [this message]
2015-07-08 15:14 ` David Malcolm
2015-05-08 21:45 ` [PATCH 2/4 v2] libcpp: Replace macro usage with C++ constructs) Jeff Law
2015-05-10 15:39 ` Jan Hubicka
2015-05-02 0:44 ` [PATCH 4/4] Replace line_map union with C++ class hierarchy David Malcolm
2015-05-04 20:45 ` Jeff Law
2015-05-04 21:34 ` David Malcolm
2015-05-14 15:20 ` Jeff Law
2015-05-02 0:44 ` [PATCH 3/4] libcpp/input.c: Add a way to visualize the linemaps David Malcolm
2015-05-04 19:20 ` Jeff Law
2015-05-13 14:05 ` David Malcolm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874mle66vz.fsf@kepler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).