I have a C++ app that I build on Fedora, Ubuntu, and Red Hat Enterprise
Linux. I use almost the exact same g++ command line arguments to build
on each platform. However, under RHEL, g++ reports compiler warnings
that it does not report on the other distros. I am starting to wonder if
maybe RHEL patches g++.
The warning is this:
double d = 42.0;
int i = d; // Warning here
It's a great warning, and I'd like the other distros to give it to me
too, but I can't seem to make them do it.
I've tried the -Wconversion argument, but that causes a whole bunch of
extra warnings to appear that I don't want (like conversions from "long"
to "int"). I have my reasons for not wanting these warnings (hint: Qt
header files).
Also note that I don't use -Wconversion on any distro, including RHEL,
but I still get the warnings when converting from double to int.
This has been the case since RHEL 3, and it still happens on RHEL 5
(have not tested RHEL 6 yet).
Any ideas?
--Dave
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/