Suggested compiler warnings when working with doubles

can anyone give me any compiler warnings that might help when dealing with a mixture of doubles and floats?

currently I’m using “-w9 -Wall -Wpointer-arith -Wno-shadow -Wwrite-strings -pedantic”
I ditched -W (-Wextra?), due to false +ves I was getting in a QNX source.

also can anyone tell me what the qnx compiler version of the following are:
-Wunsuffixed-float-constants
-Wfloat-equal
-Wdouble-promotion
(via gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)

Cheers

QNX uses gcc so these option should be supported, however the doc you pointed to are for the latest release of GCC. The version of gcc use in your version of QNX (you didn’t say which one you use) may not support these options.

For x86 the double-promotion doesn’t really apply as double are handled in hardware.

I just tried -Wfloat-equal with QNX 6.5.0 ( gcc4.4.2) and it works fine.

Cheers! I was using gcc2.95.3 (Qnx632), but I’ve just spotted I can move that up to gcc3.3.5 which does support -Wfloat-equal.

Go to 6.4 if you can, better compiler, better performance, better network stack…

if we upgrade it would prob be to 6.5 and then we’d get hit with a hefty bill.

Do you mean you do not have a maintenance & support contract with QNX?! If you have, upgrading is free. If you don’t have, and are actively working on a QNX project… ehm… I’m out.

I do mean that, (QNX are aware) AFAIK when we stopped paying the support free we lost upgrades and support but we’re still licensed to develop using our existing momentics setup.