This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH C] PR32207
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: Shujing Zhao <pearly dot zhao at oracle dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Fri, 23 Apr 2010 10:17:35 +0200
- Subject: Re: [PATCH C] PR32207
- References: <4BD152D4.3000901@oracle.com>
On 23 April 2010 09:57, Shujing Zhao <pearly.zhao@oracle.com> wrote:
>
> The warning message for `z!=0` and `z!=(void*)0` is changed from "the
> address of ‘z’ will never be NULL" to "the comparison will always evaluate
> as 'true' for the address of ‘z’ will never be NULL". Because for the users,
> the second and the third conditional expression are comparison expression,
> and the warning message location is focus on the operator "!=" or "==".
> Consider the user end and the location, I choose to add "the comparison ..."
> to the warning message. Is it ok?
Hi!
I cannot approve it but I think it is an improvement but still I don't
think it is totally correct for:
if (z >= 0) or (z || x).
But it is much better than before. Thanks!
A minor issue is that you do not add C++ testcases. If the C testcases
are compilable in C++, you can just move them (svn mv) to
gcc.dg/c-c++-common/ and they will be tested for both languages.
Cheers,
Manuel.