This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [c/c++] PR35058: -Werror= works only with some warnings
2008/7/22 Joseph S. Myers <joseph@codesourcery.com>:
>
> Could you please clarify why the extra_warnings check is removed in
>
> - if (pedantic || extra_warnings)
> - pedwarn ("ordered comparison of pointer with integer zero");
> + pedwarn (OPT_pedantic,
> + "ordered comparison of pointer with integer zero");
>
> ? This is a documented case of -Wextra. Apart from that, the C front-end
> changes are OK.
To be honest, I am not sure why I did that. So I guess that should be:
if (pedantic)
pedwarn (OPT_pedantic, "");
else if (extra_warnings)
warning (OPT_Wextra, "");
If you look the case below that one, you'll notice that -Wextra warns
for p > 0 but not for 0 < p, which seems inconsistent. Should I fix
that or it is on purpose?
Cheers,
Manuel.