Afficher un message
Vieux 18/10/2007, 12h26   #1
dspfun
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Question about size and memory layout of a Union.

> > Just to make sure:
> > The question itself specifies that the machine is little endian and
> > has a 32-bit word alignment for memory access and an unsigned integer
> > is 32 bit long. Does that make the answers explicit/valid, or are the
> > answers still implementation specific?

>
> Well, your answers demonstrate one reasonable response to the code by an
> implementation on such a platform. Possibly the *most* reasonable
> response. Unfortunately for the purpose of your question, the C Standard
> does not require that implementations must be reasonable; it requires only
> that they act in accordance with the Standard. And it is certainly
> possible - even easy - to imagine answers different to yours that are
> still in accordance with the Standard, even on such hardware as you
> specify.


Thanks again for your answers!

Could you give some "easy" examples of how the answers could be
different while still running on the specified hardware?

BRs!

  Réponse avec citation
 
Page generated in 0,04746 seconds with 9 queries