mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 21:33:04 +00:00
portability: beware of max () with MSVC
Reported by Maarten De Braekeleer. https://lists.gnu.org/r/bison-patches/2020-07/msg00080.html We don't want to use gnulib's min and max macros, since we use function calls in min/max arguments. * src/location.c (max_int, min_int): Move to... * src/system.h: here. * src/counterexample.c, src/derivation.c: Use max_int instead of max.
This commit is contained in:
@@ -40,18 +40,6 @@
|
||||
|
||||
location const empty_loc = EMPTY_LOCATION_INIT;
|
||||
|
||||
static int
|
||||
min_int (int a, int b)
|
||||
{
|
||||
return a < b ? a : b;
|
||||
}
|
||||
|
||||
static int
|
||||
max_int (int a, int b)
|
||||
{
|
||||
return a >= b ? a : b;
|
||||
}
|
||||
|
||||
/* The terminal width. Not less than 40. */
|
||||
static int
|
||||
columns (void)
|
||||
|
||||
Reference in New Issue
Block a user