[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mcr7h75oopi.fsf@coign.corp.google.com>
Date: Mon, 25 Jul 2011 17:44:25 -0700
From: Ian Lance Taylor <iant@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Arnaud Lacombe <lacombar@...il.com>, gcc-help@....gnu.org,
stufever@...il.com, linux-kernel@...r.kernel.org,
Wang Shaoyan <wangshaoyan.pt@...bao.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] TRACING: Fix a copmile warning
Steven Rostedt <rostedt@...dmis.org> writes:
>> It seems gcc transforms the conditional from:
>>
>> if (a != NULL && b != NULL) ...
>>
>> to
>>
>> if (b != NULL && a != NULL) ...
>>
>> In which case the warning is fully valid. I'm not sure what's the C
>> standard guarantee in term of conditional test order. gcc 4.7.0 has
>> the same behavior.
>
> Yes it seems to be doing this :-/
>
> This is a real bug!
To be clear, gcc is not doing that, and this is not a code generation
bug. It is a warning generation bug; the generated code is correct.
Ian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists