bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bison 2.6.2 generates incompatible header file


From: Chuan-kai Lin
Subject: bison 2.6.2 generates incompatible header file
Date: Wed, 17 Oct 2012 11:00:49 -0700

Hi,

I am forwarding this bug report by Bill Allombert from the Debian bug
tracking system (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689700).
Here is Bill's report:

"""
This version (2.6.2) of bison -d parse.y generates a parse.h ending
file with the following
(assuming the file contain
%parse-param {char **lex}
)

#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int parse (void *YYPARSE_PARAM);
#else
int parse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int parse (char **lex);
#else
int parse ();
#endif

This was not done in bison 2.4.1 and earlier release, and as far as I
can see this
change is not documented anywere.

This is unfortunate because this does not necessarily declare int
parse (char **lex)
in the right C++ namespace, causing conflict with the user supplied prototype
(which is certainly necessary with older releases), causing compilation error.
"""

Was this change a regression?  Or was it intentional?  Please let us
know whether
you could provide a patch to fix the problem, or instructions on how
software that
depend on bison should accommodate this new behavior.

-- 
Chuan-kai Lin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]