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:
@@ -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[);
|
||||
|
||||
Reference in New Issue
Block a user