This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: volatile shared memory
On 16 March 2012 14:08, Jeffrey Walton wrote:
>
> I see they are referring to their wonderful abstract machine. That's
> the same machine that has unlimited register sizes and never suffers
> overflow or wrap.
No it isn't.
"Certain aspects and operations of the abstract machine are described
in this International Standard as implementation-defined (for example,
sizeof(int))."
Overflow: "If during the evaluation of an expression, the result is
not mathematically defined or not in the range of representable values
for its type, the behavior is undefined."
Wrapping: "Unsigned integers, declared unsigned, shall obey the laws
of arithmetic modulo 2^n where n is the number of bits in the value
representation of that particular size of integer"
Registers are outside the scope of the standard.