emacs-devel
[Top][All Lists]
Advanced

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

Re: immediate strings #2


From: Ken Raeburn
Subject: Re: immediate strings #2
Date: Mon, 28 Nov 2011 19:57:23 -0500

On Nov 28, 2011, at 17:25, Andreas Schwab wrote:
> Stefan Monnier <address@hidden> writes:
> 
>> Not that it's relevant to Emacs, but I don't know which part of the
>> C standard would force a C compiler to layout all unions at an
>> "addressable" offset.
> 
> 6.7.2.1#13

Well, I think Stefan's technically right... the "as-if" rule lets the compiler 
get away with a lot, if it can analyze enough of the program to figure out that 
it wouldn't make a difference to the semantics ("no one will notice", as Stefan 
put it).  For example, gcc can make some variables that have their addresses 
taken still live in registers anyways.  But few or none of the compilers we 
care about right now will do that when dealing with structure layouts and 
multiple source files as in Emacs; they'll implement something close enough to 
the abstract machine description in the standard that the union would have to 
be addressable.

Ken


reply via email to

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