A few other GMP improvements (Was: use of ALLOC(), SIZE(), PTR() macros in libgmp)
Jan Nijtmans
nijtmans at users.sourceforge.net
Mon Dec 17 13:57:14 CET 2007
A few more minor improvements. A patch file "diff.txt" is appended to this mail.
- dumbmp.c already includes <stdio.h> and <stdlib.h>, so any file including
dumbmp.c (gen-psqr.c, gan-fac_ui.c, gen-fib.c) does not need to include those
header files again.
- In gmp-impl.h, there is the line:
#if ! __GMP_WITHIN_CONFIGURE
But in all other places (gmp.h, mp.h) the following line is used:
#if ! defined (__GMP_WITHIN_CONFIGURE)
Most preprocessors consider a non-existing macro as false, but this
is not standard, so gmp-impl.h is not correct (although gcc accepts it).
- In mpn/generic/addsub_n.c, the stack variables acyn resp ssyn can
be eliminated if HAVE_NATIVE_mpn_add_nc resp HAVE_NATIVE_mpn_sub_nc
are defined. (This eliminates a warning when using gcc -Wall).
- In mpz/get_str.c, mpz/out_str.c and demos/pexpr.c, char pointers are
initialized
with const char pointers. gcc doesn't warn for that by default, but if
-Wwrite-strings is specified gcc does warn about it.
Regards,
Jan Nijtmans
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.txt
Url: http://gmplib.org/list-archives/gmp-devel/attachments/20071217/1480f563/attachment.txt
More information about the gmp-devel
mailing list