Re: Atomic operations in 32 and 64 bit platforms



Looks like I've pissed off the moderator on clax, so I'm forwarding
my response to Rod here instead...

"Rod Pemberton" <spamtrap@xxxxxxxxxx> writes:
"Phil Carmody" <thefatphil_demunged@xxxxxxxxxxx> wrote in message
news:87prp5t24v.fsf@xxxxxxxxxxxxxxxxxxxxxxx
"Rod Pemberton" <spamtrap@xxxxxxxxxx> writes:
"Phil Carmody" <thefatphil_demunged@xxxxxxxxxxx> wrote in message
news:87y73ttvjg.fsf@xxxxxxxxxxxxxxxxxxxxxxx
"Rod Pemberton" <spamtrap@xxxxxxxxxx> writes:

Walter Bright's (Digital Mars) comments on parameter evaluation
(circa
'88):
http://groups.google.com/group/comp.sys.ibm.pc/msg/be06e13d93f43111

(I.e., the C89 spec. only requires that variadic function parameters
must be evaluated right to left... not fixed function parameters.)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

We'll need those few words later.

I don't have C89 to hand

Nor do I.

would you care to cite support
for that?

Cite support for what? I didn't make any claims... I only summarize
his
post for those who wouldn't follow the link to read it. What did you
think
the "I.e.,.." in parenthesis is for?

But you didn't summarise his post at all.

What?

What I said.

Your 'I.e.' seems to
contain only your own original ideas only tangentially related
to what Walter Bright was talking about,

My own tangential ideas...?! Phil, it does no such thing. I don't know how
you can make that claim.

Easily.

and which I believe
to be misguided.

"misguided"... I believe you should've felt free to post your thoughts on
what you believed Walter Bright had said right here. You didn't (typical).

You already posted a link to what he said. There was no need to
repeat it. I was expecting you to have the integrity to go back
to your post, and to your link, and to compare the two, rather
than just pretending that nothing was wrong.

I believe there was a reason you didn't (argumentative). But, you had no
problem spending time complaining that I'm wrong (frequent).

Don't play your part, and I won't play mine.

Since you seem
to be devoid of thoughts other than criticisms at the moment, this is the
important part of what Walter Bright said as I understood it:

1) ANSI C (e.g., C89) requires functions without ellipsis '...' to have a
fixed number of parameters. (i.e., prototyped with variable args)

Not disputed.

2) ANSI C, through the use of syntax - specifically ellipsis '...', allows
a compiler to evaluate functions with fixed parameters in any order instead
of just right-to-left order. (i.e., cdecl in this situation)
(I.e., a compiler can choose the best calling convention, which are 'C
calling convention' or 'cdecl' and 'Pascal' in this situation, from Rahul
Dhesi's earlier comments.)

Now that's certainly a misrepresentation of what he says, and
the standard too, for that matter.

Firstly, what you've written barely makes sense. The somewhat
irrelevant order in which functions are evaluated is even
*more* tangential to your previous diversion (underlined above).
The topic under discussion was the parameters themselves.
You, as indicated above, made an assertion about the order of
evaluation of those parameters being important. Walter, however,
makes no mention at all of evaluation order at all.

Do you wish me to quote his entire post in order to prove
that he doesn't make mention of it?

3) ANSIC C doesn't allow the compiler to select a non-right-to-left
calling convention (non-'cdecl' in this case, such as 'Pascal'), if the
function has variadic arguments, or if functions with variadic arguments are
unprototyped.

Not disputed.

Except for an explicit statement of what the calling conventions are (Rahul
Dhesi's post) and how they pass arguments (Roberto Shironoshita's post)
which were implicit in the first part Walter's post, this is all directly
from the second to last paragraph of Walter's post. I don't see how this is
tangential or misguided.

Because you're confusing parameter-passing/stack-cleanup (a.k.a.
calling convention) with the order in which the parameters are
evaluated. If you could tell the difference between those two
concepts you'd be on the right track.


Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
.