Warning using -Wconversion and -Ox in gcc 4.5 and 4.6 but not in previous releases
Marc Glisse
marc.glisse@inria.fr
Sun Jun 5 14:45:00 GMT 2011
On Sun, 5 Jun 2011, José Luis GarcÃa Pallero wrote:
> Hello,
> Three months ago I sent this mail to gcc-help:
>
> http://gcc.gnu.org/ml/gcc-help/2011-03/msg00064.html
>
> The behavior in gcc 4.6 release persists. I don't know if it is a bug
> exactly (in the original mail, some says that is a bug and some no).
There is no shame in filing a bug report without being absolutely certain.
In this case you could file one for gcc asking to improve the warning
(casting the constant 0 won't change its sign...), and one against glibc
asking that they explicitly cast 0 to size_t, after looking a bit if you
can find anything similar already reported. I am not saying either change
will happen, but it seems like a resonable strategy. And you may get
interesting comments on the bug reports.
--
Marc Glisse
More information about the Gcc-help
mailing list