This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -Wconversion producing incorrect warning
- From: John Love-Jensen <eljay at adobe dot com>
- To: "Kevin P. Fleming" <kpfleming at starnetworks dot us>
- Cc: MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Mon, 31 Oct 2005 12:52:55 -0500
- Subject: Re: -Wconversion producing incorrect warning
Hi Kevin,
> What concerns me is that the warning message states this is happening
> because of the prototype, but that's not technically true... on a
> platform that actually chose to pass the 16-bit quantity on the stack
> the warning would not occur, so this is a platform-specific problem, not
> anything wrong with the code itself.
Correct. On that platform, the warning is occurring because of the
platform's ABI.
The warning does not indicate that there is anything wrong with the code
itself. The warning is justified, warranted, and desirable if/when/where
-Wconversion is specified, since the warning tells you that something funny
is happening that may not be apparent from the code itself, on that
particular platform.
Sincerely,
--Eljay