bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: integer types


From: Andreas Schwab
Subject: Re: integer types
Date: Wed, 05 Apr 2023 18:26:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

On Apr 05 2023, Eli Zaretskii wrote:

> If the pointer is to a narrower type, then dereferencing it will take
> only part of the bits of the integer value.  Depending on the
> endianness, that part could be the LSB (good) or MSB (bad).

A conversion operates on the value, not representation, so endianess
doesn't come into play.

On the other hand, converting an integer to a pointer and back does not
guarantee preservation of the integer value (unlike the other direction
as long as the intervening integer type is wide enough).

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]