mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +00:00
Port better to C++ platforms
* data/skeletons/yacc.c (YYPTRDIFF_T, YYPTRDIFF_MAXIMUM): Default to long, not int. (yy_lac_stack_realloc, yy_lac, yytnamerr, yyparse): Avoid casts to YYPTRDIFF_T that were masking the problem.
This commit is contained in:
13
TODO
13
TODO
@@ -107,15 +107,10 @@ name they have in gcc, clang, etc. Likewise for the complain_* series of
|
||||
functions.
|
||||
|
||||
* Modernization
|
||||
Remove some casts made for old compilers, such as Clang++ 3.3 and 3.4 when
|
||||
compiling yacc.c code:
|
||||
|
||||
YYPTRDIFF_T yysize = (YYPTRDIFF_T) (yyssp - yyss + 1);
|
||||
|
||||
YYPTRDIFF_T yysize_old =
|
||||
*yytop == yytop_empty ? 0 : (YYPTRDIFF_T) (*yytop - *yybottom + 1);
|
||||
|
||||
YYPTRDIFF_T yysize = (YYPTRDIFF_T) (yyesp - *yyes + 1);
|
||||
Fix data/skeletons/yacc.c so that it defines YYPTRDIFF_T properly for modern
|
||||
and older C++ compilers. Currently the code defaults to defining it to
|
||||
'long' for non-GCC compilers, but it should use the proper C++ magic to
|
||||
define it to the same type as the C ptrdiff_t type.
|
||||
|
||||
* Completion
|
||||
Several features are not available in all the backends.
|
||||
|
||||
Reference in New Issue
Block a user