* 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:
Paul Eggert
2006-09-11 18:56:58 +00:00
parent 84567a1b1c
commit aef3da8689
5 changed files with 36 additions and 11 deletions

View File

@@ -190,7 +190,7 @@ m4_ifval([$6], [%union
int ival;
}])
AT_LALR1_CC_IF([%define "global_tokens_and_yystype"])
m4_ifval([$6], [[%end-header {]], [[%start-header {]])
m4_ifval([$6], [[%end-header {]], [[%after-header {]])
AT_LALR1_CC_IF([typedef yy::location YYLTYPE;
m4_ifval([$6], , [#define YYSTYPE int])])
[static int yylex (]AT_LEX_FORMALS[);