[GiNaC-devel] Re: [GiNaC-list] Possible size issue in test in numeric.cpp
Richard B. Kreckel
kreckel at ginac.de
Mon Aug 7 22:56:07 CEST 2006
Jens Vollinga wrote:
> Chris Dams schrieb:
>
>> I'm not a CLN expert either, but to me it does not seem that the code is
>> incorrect. On the AMD 64 platform it is apparently always okay to apply
>> the constructor cl_I(int) no matter how large the integer argument
>> is. If
>> the compiler is smart enough, it will automatically do what your
>> patch is
>> doing (i.e., throw the if out of the code), so I fail to see benefits
>> from
>> your patch.
>
>
> you are right: the code is correct and a smart compiler will do the
> same what Pierangelo's patch does. Still, I am somewhat in favor of
> applying this patch, because it removes an irritating warning. It is
> not just an annoying warning. It looks as if it had some meaning to it
> and thereby provokes patch-production or raises doubt about the code
> quality of ginac.
I've no strong feeling one way or the other. Go, apply it, but please
make sure you write the comparison as cl_value_len >= 32 since CLN 1.2
will use more of those bits of a 64 bit digit on machines that support it.
What makes me wonder is why there is no such warning with the other ctor
from unsigned.
Regards
-richy.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>
More information about the GiNaC-devel
mailing list