From: Timothy Shimmin <tes@sgi.com>
To: Alex Elder <aelder@sgi.com>
Cc: David Chinner <dgc@sgi.com>, Lachlan Mcllroy <lachlan@sgi.com>,
xfs-oss <xfs@oss.sgi.com>, xfs-dev <xfs-dev@sgi.com>
Subject: Re: [Patch] xfs_lowbit64 broken on ia32
Date: Thu, 06 Dec 2007 11:04:26 +1100 [thread overview]
Message-ID: <47573C8A.1060902@sgi.com> (raw)
In-Reply-To: <D59801BCA402F5418C040937230AF7E0755AF5@mtv-amer002e--3.americas.sgi.com>
Alex Elder wrote:
> David Chinner wrote:
> . . .
>>>> Index: 2.6.x-xfs-new/fs/xfs/xfs_bit.h
>>>> ===================================================================
>>>> --- 2.6.x-xfs-new.orig/fs/xfs/xfs_bit.h 2007-11-02
>>>> 13:44:45.000000000 +1100
>>>> +++ 2.6.x-xfs-new/fs/xfs/xfs_bit.h 2007-12-03
>> 14:43:33.169851481 +1100
>>>> @@ -68,8 +68,8 @@ static inline int xfs_lowbit32(__uint32_
>>>> /* Get low bit set out of 64-bit argument, -1 if none set */
>>>> static inline int xfs_lowbit64(__uint64_t v)
>>>> {
>>>> - unsigned long t = v;
>>>> - return (v) ? find_first_bit(&t, 64) : -1;
>>>> + unsigned long long t = v;
>>> Why create a local copy? Why not just pass v into find_first_bit()?
>> Because I thought that taking the address of a function parameter
>> was a big no-no because the result is undefined (i.e. platform and
>> compiler dependent)?
>
> I've never heard of this, and it's incorrect--at least with respect
> to standard C. (But that's not to say in practice some compiler
> does it wrong.) Unless it's a real (details known) problem you
> shouldn't try to work around it.
>
> -Alex
>
I've never heard of that either.
(Then again, I didn't know until recently that they changed C
to allow "flexible array members" in C99
http://tigcc.ticalc.org/doc/gnuexts.html#SEC75)
--Tim
next prev parent reply other threads:[~2007-12-06 0:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 21:16 [Patch] xfs_lowbit64 broken on ia32 David Chinner
2007-12-05 2:11 ` Lachlan McIlroy
2007-12-05 3:21 ` David Chinner
2007-12-05 5:37 ` Lachlan McIlroy
2007-12-05 5:44 ` David Chinner
2007-12-05 6:35 ` Lachlan McIlroy
2007-12-05 12:14 ` Alex Elder
2007-12-05 13:44 ` Which (lib)acl for 2.4.35? Jameel Akari
2007-12-06 0:04 ` Timothy Shimmin [this message]
2007-12-06 2:15 ` [Patch] xfs_lowbit64 broken on ia32 Alex Elder
2007-12-06 1:55 ` David Chinner
2007-12-06 2:22 ` Alex Elder
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=47573C8A.1060902@sgi.com \
--to=tes@sgi.com \
--cc=aelder@sgi.com \
--cc=dgc@sgi.com \
--cc=lachlan@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.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