This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/4 v2: part 2] libcpp: Replace macro usage with C++ constructs
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 08 Jul 2015 11:06:57 -0400
- Subject: Re: [PATCH 2/4 v2: part 2] libcpp: Replace macro usage with C++ constructs
- Authentication-results: sourceware.org; auth=none
- References: <5547C538 dot 5000606 at redhat dot com> <1430850074-40522-1-git-send-email-dmalcolm at redhat dot com> <1430850074-40522-3-git-send-email-dmalcolm at redhat dot com> <874mle66vz dot fsf at kepler dot schwinge dot homeip dot net>
On Wed, 2015-07-08 at 16:50 +0200, Thomas Schwinge wrote:
> 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
Oops; thanks!