Patrick.Pelissier at loria.fr
Wed Sep 22 11:00:55 CEST 2004
> > /* Dummy for non-gcc, code involving it will go dead. */
> > #if ! defined (__GNUC__) || __GNUC__ < 2
> > #define __builtin_constant_p(x) 0
> > #endif
> '__builtin_constant_p' is also used in gmp.h, so I don't think
> using such a code is a good idea.
> I don't understand.
> "Such a code" is also needed for gmp-h.in:
> /* When using GCC, optimize certain common comparisons. */
> - #if defined (__GNUC__)
> + #if defined (__GNUC__) && __GNUC__ >= 2
> #define mpz_cmp_ui(Z,UI) \
That's what I want to say: you shouldn't define __builtin_constant_p to 0
in gmp-h.in but rather check if __GNUC__ >=2 when you define macro using
__builtin_constant_p, what you did.
More information about the gmp-devel