Jens Vollinga writes:
thanks for your patch! We had a discussion about it on the other GiNaC mailing list (ginac-devel) and we are going to apply it. It will be part of the forthcoming 1.3.5 release then.
@Richy: You wondered why the other ctor for unsigned int doesn't raise such a warning. After looking at the code I now wonder whether the code there is optimal. The argument is compared against 2^(cl_value_len-1) and not 2^(cl_value_len)-1 as one might expect. Maybe this should be changed? Could you comment on this soon, because I'd like to roll the release this evening?
I agree it should be i < ((1UL << cl_value_len)-1) In this case, a fix similar to the "int" case on 64 bit architectires would apply, since a "unsigned" will always be less than 2^32. A patch is available at <http://mbdyn.aero.polimi.it/~masarati/Download/mbdyn/ginac-numeric-uint.pat ch> Cheers, p. Dr. Pierangelo Masarati | voice: +39 02 2399 8309 Dip. Ing. Aerospaziale | fax: +39 02 2399 8334 Politecnico di Milano | mailto:pierangelo.masarati@polimi.it via La Masa 34, 20156 Milano, Italy | http://www.aero.polimi.it/~masarati Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html