mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/glr.c (b4_shared_declarations): Put start-header first,
before any #includes that we generate, so that feature-test macros work. Problem reported by Michael Deutschmann in <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>. * data/lalr1.cc: Likewise. * doc/bison.texinfo (Prologue): Document that feature-test macros should be defined before any Bison declarations. * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns that depend on location.hh after, not before, Bison decls, since we now include location.hh after the first user prologue.
This commit is contained in:
@@ -221,6 +221,10 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
#ifndef PARSER_HEADER_H
|
||||
# define PARSER_HEADER_H
|
||||
|
||||
]m4_ifdef([b4_start_header],
|
||||
[[/* Copy the %start-header blocks. */
|
||||
]b4_user_start_header])[
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
@@ -233,10 +237,6 @@ namespace ]b4_namespace[
|
||||
class location;
|
||||
}
|
||||
|
||||
]m4_ifdef([b4_start_header],
|
||||
[[/* Copy the %start-header blocks. */
|
||||
]b4_user_start_header])[
|
||||
|
||||
#include "location.hh"
|
||||
|
||||
/* Enabling traces. */
|
||||
|
||||
Reference in New Issue
Block a user