public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaud Lacombe <lacombar@gmail.com>,
	gcc-help@gcc.gnu.org, stufever@gmail.com,
	linux-kernel@vger.kernel.org,
	Wang Shaoyan <wangshaoyan.pt@taobao.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] TRACING: Fix a copmile warning
Date: Mon, 25 Jul 2011 17:44:25 -0700	[thread overview]
Message-ID: <mcr7h75oopi.fsf@coign.corp.google.com> (raw)
In-Reply-To: <1311640534.3526.50.camel@gandalf.stny.rr.com> (Steven Rostedt's message of "Mon, 25 Jul 2011 20:35:34 -0400")

Steven Rostedt <rostedt@goodmis.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

  reply	other threads:[~2011-07-26  0:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18  9:40 [PATCH] TRACING: Fix a copmile warning stufever
2011-07-25 18:32 ` Steven Rostedt
2011-07-25 19:43   ` Arnaud Lacombe
2011-07-25 20:19     ` Steven Rostedt
2011-07-25 20:28       ` Arnaud Lacombe
2011-07-25 22:38       ` Arnaud Lacombe
2011-07-25 23:49         ` Steven Rostedt
2011-07-25 23:52           ` Arnaud Lacombe
2011-07-26  0:14             ` Steven Rostedt
2011-07-25 23:50         ` Arnaud Lacombe
2011-07-25 23:58           ` Arnaud Lacombe
2011-07-26  0:08             ` Steven Rostedt
2011-07-26  0:35           ` Steven Rostedt
2011-07-26  0:44             ` Ian Lance Taylor [this message]
2011-07-26  0:41           ` Ian Lance Taylor
2011-07-26  1:08             ` Arnaud Lacombe
2011-07-26  1:12               ` Steven Rostedt
2011-07-26  1:19                 ` Arnaud Lacombe
2011-07-26 20:43                   ` Jeff Law
2011-07-26  1:10             ` Steven Rostedt
2011-07-26  5:55               ` Ian Lance Taylor
2011-07-26 12:00   ` Paulo Marques
2011-07-26 13:18     ` Jesper Juhl
2011-07-26 13:32       ` Paulo Marques
2011-07-26 13:55         ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2011-07-18  9:35 stufever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mcr7h75oopi.fsf@coign.corp.google.com \
    --to=iant@google.com \
    --cc=fweisbec@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=lacombar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=stufever@gmail.com \
    --cc=wangshaoyan.pt@taobao.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox