зеркало из https://github.com/github/ruby.git
[Bug #20524] win32: Suppress GMP warning
``` C:\vcpkg\installed\x64-windows\include\gmp.h(2237): warning C4146: unary minus operator applied to unsigned type, result still unsigned ```
This commit is contained in:
Родитель
d7e558e3c4
Коммит
f8e3dd4ec1
12
bignum.c
12
bignum.c
|
@ -30,9 +30,6 @@
|
|||
# define USE_GMP 0
|
||||
#endif
|
||||
#endif
|
||||
#if USE_GMP
|
||||
# include <gmp.h>
|
||||
#endif
|
||||
|
||||
#include "id.h"
|
||||
#include "internal.h"
|
||||
|
@ -48,6 +45,15 @@
|
|||
#include "ruby/util.h"
|
||||
#include "ruby_assert.h"
|
||||
|
||||
#if USE_GMP
|
||||
RBIMPL_WARNING_PUSH()
|
||||
# ifdef _MSC_VER
|
||||
RBIMPL_WARNING_IGNORED(4146) /* for mpn_neg() */
|
||||
# endif
|
||||
# include <gmp.h>
|
||||
RBIMPL_WARNING_POP()
|
||||
#endif
|
||||
|
||||
static const bool debug_integer_pack = (
|
||||
#ifdef DEBUG_INTEGER_PACK
|
||||
DEBUG_INTEGER_PACK+0
|
||||
|
|
12
rational.c
12
rational.c
|
@ -22,9 +22,6 @@
|
|||
# define USE_GMP 0
|
||||
#endif
|
||||
#endif
|
||||
#if USE_GMP
|
||||
#include <gmp.h>
|
||||
#endif
|
||||
|
||||
#include "id.h"
|
||||
#include "internal.h"
|
||||
|
@ -36,6 +33,15 @@
|
|||
#include "internal/rational.h"
|
||||
#include "ruby_assert.h"
|
||||
|
||||
#if USE_GMP
|
||||
RBIMPL_WARNING_PUSH()
|
||||
# ifdef _MSC_VER
|
||||
RBIMPL_WARNING_IGNORED(4146) /* for mpn_neg() */
|
||||
# endif
|
||||
# include <gmp.h>
|
||||
RBIMPL_WARNING_POP()
|
||||
#endif
|
||||
|
||||
#define ZERO INT2FIX(0)
|
||||
#define ONE INT2FIX(1)
|
||||
#define TWO INT2FIX(2)
|
||||
|
|
Загрузка…
Ссылка в новой задаче