c++: expose the type used to store line and column numbers

* data/skeletons/location.cc (position::counter_type)
(location::counter_type): New.
Use them.
* doc/bison.texi (C++ position, C++ location): Adjust.
This commit is contained in:
Akim Demaille
2019-11-06 08:33:44 +01:00
parent 583c193ffa
commit 7bdf7246fb
3 changed files with 68 additions and 51 deletions

3
NEWS
View File

@@ -14,7 +14,8 @@ GNU Bison NEWS
In C++, line numbers and columns are now represented as 'int' not
'unsigned', so that integer overflow on positions is easily checkable via
'gcc -fsanitize=undefined' and the like. This affects the API for
positions.
positions. The default position and location classes now expose
'counter_type' (int), used to define line and column numbers.
** Bug fixes