From: "Adam Kropelin" <akropel1@rochester.rr.com>
To: "Rick Stevens" <rstevens@vitalstream.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: 2.5.8-dj1 : arch/i386/kernel/smpboot.c error
Date: Wed, 17 Apr 2002 17:49:13 -0400 [thread overview]
Message-ID: <022e01c1e659$b706f990$02c8a8c0@kroptech.com> (raw)
In-Reply-To: <20020417123044.GA8833@www.kroptech.com> <2673595977.1019032098@[10.10.2.3]> <20020417191718.GA8660@www.kroptech.com> <3CBDCD8D.1090802@vitalstream.com> <1831780000.1019076835@flay> <20020417204037.GA292@www.kroptech.com> <3CBDE658.1030102@vitalstream.com>
Rick Stevens wrote:
> Adam Kropelin wrote:
>> Indeed. The optimization step that (presumably) removes the body
>> of the if() must happen after the body has been fully evaluated.
>> Makes sense, I guess, now that I think about it...
>
> Right. If the first condition of a logical AND statement is false,
> the remainder need not be evaluated at all. Hence, the entire if
> statement can (and perhaps should) be eliminated by the compiler,
> since the condition is false.
>
> I didn't see what the actual message from the compiler was, but it
> was probably just a warning.
Thanks for the help, but it was an error, not a warning.
It is caused by invalid code inside the body of the if(). The question
is not what is causing the error but why the compiler is evaluating the
body at all, given that the conditional is always false.
Apparently the body is evaluated prior to the optimizer getting a
chance to nullify the whole construct.
--Adam
next prev parent reply other threads:[~2002-04-17 21:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-16 2:19 2.5.8-dj1 : arch/i386/kernel/smpboot.c error Frank Davis
2002-04-17 2:47 ` Adam Kropelin
2002-04-17 4:59 ` Martin J. Bligh
2002-04-17 12:30 ` Adam Kropelin
2002-04-17 12:40 ` Adam Kropelin
2002-04-17 15:28 ` Martin J. Bligh
2002-04-17 19:17 ` Adam Kropelin
2002-04-17 19:31 ` Rick Stevens
2002-04-17 20:53 ` Martin J. Bligh
2002-04-17 20:40 ` Adam Kropelin
2002-04-17 21:17 ` Rick Stevens
2002-04-17 21:49 ` Adam Kropelin [this message]
2002-04-17 22:06 ` J.A. Magallon
2002-04-18 0:34 ` Martin J. Bligh
2002-04-18 2:16 ` Stevie O
2002-04-17 20:49 ` Martin J. Bligh
2002-04-17 22:56 ` Stevie O
2002-04-18 0:29 ` Martin J. Bligh
2002-04-21 13:37 ` [PATCH] " Brian Gerst
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='022e01c1e659$b706f990$02c8a8c0@kroptech.com' \
--to=akropel1@rochester.rr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rstevens@vitalstream.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