Should we declare _itch functions __GMP_NOTHROW __GMP_ATTRIBUTE_PURE ?

2014-01-05 Thread bodrato
Ciao, Looking at https://gmplib.org/devel/lcov/shell/gmp/mpn/sec_powm.c.gcov.html I saw that the function mpn_sec_powm_itch() is called twice for each mpn_sec_powm(). This depends (I assume) because of the multiple evaluation in the macro TMP_ALLOC_LIMBS (n + mpn_sec_powm_itch (bn, en, n)); in

Re: Should we declare _itch functions __GMP_NOTHROW __GMP_ATTRIBUTE_PURE ?

2014-01-05 Thread Torbjorn Granlund
bodr...@mail.dm.unipi.it writes: Indeed. I pushed a fix. Any comment about marking them also with __GMP_NOTHROW ? Perhaps that too. I suppose __GMP_ATTRIBUTE_PURE should really be the stronger ATTRIBUTE_CONST, except that we don't yet have any name space clean way of doing that for

Re: Should we declare _itch functions __GMP_NOTHROW __GMP_ATTRIBUTE_PURE ?

2014-01-05 Thread Marc Glisse
On Sun, 5 Jan 2014, bodr...@mail.dm.unipi.it wrote: Ciao, Il Dom, 5 Gennaio 2014 5:06 pm, Torbjorn Granlund ha scritto: bodr...@mail.dm.unipi.it writes: Indeed. I pushed a fix. Any comment about marking them also with __GMP_NOTHROW ? Perhaps that too. I suppose __GMP_ATTRIBUTE_PURE