This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Wconversion producing incorrect warning


John Love-Jensen wrote:

The ABI of your platform probably converts the uint16_t to an unsigned int
on the stack.

That's what I suspected, as the person who provided that code reported that's what was causing the warning.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]