From 7799ef159452772946d91aa89213e87729288ef0 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 7 Apr 2010 16:01:42 +0200 Subject: [PATCH] lalr1.cc: remove useless forward declaration. * data/lalr1.cc: Include location.hh before stack.hh. Remove the useless forward declarations of position and location. Reported by Chris Morley. * data/glr.cc: Likewise. --- ChangeLog | 8 ++++++++ data/glr.cc | 8 +------- data/lalr1.cc | 5 +---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 760fe9c3..51d9ac5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-04-13 Akim Demaille + + lalr1.cc: remove useless forward declaration. + * data/lalr1.cc: Include location.hh before stack.hh. + Remove the useless forward declarations of position and location. + Reported by Chris Morley. + * data/glr.cc: Likewise. + 2010-04-11 Joel E. Denny * NEWS (2.4.3): Mention fix for Sun Studio C++. diff --git a/data/glr.cc b/data/glr.cc index 4ebb3d1b..feed669a 100644 --- a/data/glr.cc +++ b/data/glr.cc @@ -226,17 +226,11 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++], #include #include #include +#include "location.hh" /* Using locations. */ #define YYLSP_NEEDED ]b4_locations_if([1], [0])[ -]b4_namespace_open[ - class position; - class location; -]b4_namespace_close[ - -#include "location.hh" - /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG ]b4_parse_trace_if([1], [0])[ diff --git a/data/lalr1.cc b/data/lalr1.cc index e4cbf6f7..deab8639 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -149,16 +149,13 @@ dnl FIXME: This is wrong, we want computed header guards. #include #include #include +]b4_locations_if([#include "location.hh"])[ #include "stack.hh" ]b4_namespace_open[ -]b4_locations_if([ class position; - class location;])[ ]b4_variant_if([b4_variant_define])[ ]b4_namespace_close[ -]b4_locations_if([#include "location.hh"])[ - /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG ]b4_parse_trace_if([1], [0])[ -- 2.47.2