diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-29 04:19:38 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-29 04:19:38 +0000 |
commit | 660b6c1533d95d8d5021199da3c2876a6d273b4a (patch) | |
tree | b80d2adacef61cb526fcdeaa583b716ff24aa88f /gcc/toplev.c | |
parent | 5b6bfe45de1f95bb1099a98cea90ffef8b8a04d0 (diff) | |
download | gcc-660b6c1533d95d8d5021199da3c2876a6d273b4a.tar.gz |
* toplev.c (print_version): Update GMP version string calculation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146921 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 95b5ba3d70d..f1a481cbffe 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1130,10 +1130,14 @@ print_version (FILE *file, const char *indent) indent, __VERSION__); /* We need to stringify the GMP macro values. Ugh, gmp_version has - two string formats, "i.j.k" and "i.j" when k is zero. */ + two string formats, "i.j.k" and "i.j" when k is zero. As of + gmp-4.3.0, GMP always uses the 3 number format. */ #define GCC_GMP_STRINGIFY_VERSION3(X) #X #define GCC_GMP_STRINGIFY_VERSION2(X) GCC_GMP_STRINGIFY_VERSION3(X) -#if __GNU_MP_VERSION_PATCHLEVEL == 0 +#define GCC_GMP_VERSION_NUM(X,Y,Z) (((X) << 16L) | ((Y) << 8) | (Z)) +#define GCC_GMP_VERSION \ + GCC_GMP_VERSION_NUM(__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL) +#if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,0) && __GNU_MP_VERSION_PATCHLEVEL == 0 #define GCC_GMP_STRINGIFY_VERSION GCC_GMP_STRINGIFY_VERSION2(__GNU_MP_VERSION) "." \ GCC_GMP_STRINGIFY_VERSION2(__GNU_MP_VERSION_MINOR) #else |