The warnings have to do with the rather complicated hack expression
that's used to build a perl-like (read: correct) modulus ('%')
operator from the standard C modulus operator. The expression uses
several ternary operators, to do different things if the modulus
operands are negative. The PP code generator uses the same
expression string to generate C code for all expression types,
including the unsigned types (which can't ever be negative), which
throws four warnings per unsigned type. I suppose one could insert
gcc pragmas to turn off the warnings, but nobody has every bothered.
On Aug 14, 2007, at 6:15 PM, Trevor Carey-Smith wrote:
Hi,
My sysadmin is installing PDL-2.4.3 for me on a redhat linux box
where I work. He noticed the following warnings during build:
Ops.xs: In function `pdl_modulo_readdata':
Ops.xs:13204: warning: comparison is always true due to limited
range of data type
Ops.xs:13204: warning: comparison is always true due to limited
range of data type
Ops.xs:13204: warning: comparison is always false due to limited
range of data type
Ops.xs:13204: warning: comparison is always false due to limited
range of data type
Ops.xs:13247: warning: comparison is always true due to limited
range of data type
Ops.xs:13247: warning: comparison is always true due to limited
range of data type
Ops.xs:13247: warning: comparison is always false due to limited
range of data type
Ops.xs:13247: warning: comparison is always false due to limited
range of data type
Ops.xs:13408: warning: comparison is always true due to limited
range of data type
Ops.xs:13408: warning: comparison is always true due to limited
range of data type
Ops.xs:13408: warning: comparison is always false due to limited
range of data type
Ops.xs:13408: warning: comparison is always false due to limited
range of data type
Ops.xs:13451: warning: comparison is always true due to limited
range of data type
Ops.xs:13451: warning: comparison is always true due to limited
range of data type
Ops.xs:13451: warning: comparison is always false due to limited
range of data type
Ops.xs:13451: warning: comparison is always false due to limited
range of data type
I did a build on my own slackware linux box and the same warnings
occur
and obviously haven't affected the final PDL installation which I had
been using for a while.
Does anyone know why these warnings appear and whether it matters?
Regards,
Trevor.
-----
Dr. Trevor Carey-Smith
National Institute of Water and Atmospheric Research
Private Bag 14-901, Wellington, New Zealand
Ph: +64 4 386 0394 Fax: +64 4 386 2153
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl