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: Tue, 29 Nov 2011 10:48:17 -0500

On Nov 29, 2011, at 03:44, Andreas Schwab wrote:
> Ken Raeburn <address@hidden> writes:
> 
>> 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
> 
> Only if the address is never taken, or sizeof is never applied.

If the compiler really wants to play some games in the name of space 
optimization, it could pack the type as densely as possible (rearrange or 
eliminate fields, limit integer or pointer fields to the number of bits that 
will actually get used, etc) for actual storage, and still print sizes and 
offsets consistent with the official alignment rules for the platform, if it 
can keep the two cases straight.  (Allocating the actually-used smaller size 
instead of the larger "normal" size would still be consistent as long as the 
difference isn't visible by certain criteria; I'm pretty sure process size 
under "ps" isn't one of those criteria.)  It'd be a lot of effort and probably 
not worthwhile, but not outside of the rules.

Ken




reply via email to

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