This is the mail archive of the gcc-patches@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: [PATCH C] PR32207


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.


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