Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: x86-64 ASM output of a simple test program

Author: David Mitchell

Date: 03:41:09 09/30/05

Go up one level in this thread


On September 29, 2005 at 16:45:46, Dezhi Zhao wrote:
>>
>>Section 9.5, paragraph 1: "In a union, at most one of the data members can be
>>active at any time, that is, the value of at most one of the data members can be
>>stored in a union at any time".
>>
>>Thanks,
>>Eugene
>>
>
>OK. I sounds to me the standard is trying make a union thread safe by
>definition.

Consistent. Anything else would be wildly off the mark of the standards.

>
>However, does the compiler pass a structure of size 8 as in the expample by
>value or by reference in a function call? I think it to be by reference.
>I'm going to try it out:)
>
All values to a function are passed by value. Anything, such as a "reference",
is merely a copy of the reference you used in the exiting function. In the case
of pointers or other addresses, it just happens that those copies, have a valid
variable (or structure, function, another address, etc.), that is valid.

Dave



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.