mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
build: be sure to include config.h first in the generated parser
Using %code for config.h is wrong, as some headers will already have been included by Bison. In some cases, e.g., glibc's string.h, this results in some declaration not being made for lack of definition of _GNU_SOURCE, which is performed by config.h. * src/parse-gram.y: here.
This commit is contained in:
@@ -23,9 +23,14 @@
|
||||
#include "symtab.h"
|
||||
}
|
||||
|
||||
%code top
|
||||
{
|
||||
/* On column 0 to please syntax-check. */
|
||||
#include <config.h>
|
||||
}
|
||||
|
||||
%code
|
||||
{
|
||||
#include <config.h>
|
||||
#include "system.h"
|
||||
|
||||
#include "c-ctype.h"
|
||||
|
||||
Reference in New Issue
Block a user