[PATCH] windfarm: add PowerMac 12,1 support
Stephen Rothwell
sfr at canb.auug.org.au
Sun Mar 23 10:25:02 EST 2008
On Sat, 22 Mar 2008 23:02:46 +0000 David Woodhouse <dwmw2 at infradead.org> wrote:
>
> Yeah, there's weird shit going on with the sensor/control registration.
> I think GCC is be miscompiling it -- the sequence of
> all = all && pm121_register_control(foo...);
> all = all && pm121_register_control(bar...);
> is bailing out as soon as 'all' gets set to zero. Despite the fact that
> pm121_register_control() quite blatantly has side-effects.
Why would you expect otherwise (from the C standard):
"Unlike the bitwise binary & operator, the && operator guarantees
left-to-right evaluation; there is a sequence point after the evaluation
of the first operand. If the first operand compares equal to 0, the
second operand is not evaluated."
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080323/0252e09d/attachment.pgp>
More information about the Linuxppc-dev
mailing list