mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
C++: fix portability issue with MSVC 2017
Visual Studio issues a C4146 warning on '-static_cast<unsigned>(rhs)'.
The code is weird, probably to cope with INT_MIN. Let's go back to
using std::max (whose header is still included in position.hh...) like
originally, but with the needed casts.
Reported by 長田偉伸, and with help from Rici Lake.
See also
http://lists.gnu.org/archive/html/bug-bison/2013-02/msg00000.html
and commit 75ae829984.
* data/location.cc (position::add_): Take min as an int.
Use std::max.
While here, get rid of a couple of useless inlines.
This commit is contained in:
1
THANKS
1
THANKS
@@ -172,6 +172,7 @@ Wolfram Wagner ww@mpi-sb.mpg.de
|
||||
Wwp subscript@free.fr
|
||||
xolodho xolodho@gmail.com
|
||||
Zack Weinberg zack@codesourcery.com
|
||||
長田偉伸 cbh34680@iret.co.jp
|
||||
|
||||
Many people are not named here because we lost track of them. We
|
||||
thank them! Please, help us keeping this list up to date.
|
||||
|
||||
Reference in New Issue
Block a user