From: Ken Raeburn <raeburn@raeburn.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Emacs Dev <emacs-devel@gnu.org>
Subject: Re: immediate strings #2
Date: Tue, 29 Nov 2011 10:48:17 -0500 [thread overview]
Message-ID: <046388F1-7414-4B68-A870-20ADC9FB5C8C@raeburn.org> (raw)
In-Reply-To: <m3k46j1fnb.fsf@hase.home>
On Nov 29, 2011, at 03:44, Andreas Schwab wrote:
> Ken Raeburn <raeburn@raeburn.org> 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
next prev parent reply other threads:[~2011-11-29 15:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-28 9:11 immediate strings #2 Dmitry Antipov
2011-11-28 17:33 ` Stefan Monnier
2011-11-28 19:48 ` Ken Raeburn
2011-11-28 20:10 ` Andreas Schwab
2011-11-28 21:54 ` Stefan Monnier
2011-11-28 22:25 ` Andreas Schwab
2011-11-29 0:57 ` Ken Raeburn
2011-11-29 8:44 ` Andreas Schwab
2011-11-29 15:48 ` Ken Raeburn [this message]
2011-11-29 16:08 ` Andreas Schwab
2011-11-30 16:43 ` Ken Raeburn
2011-11-28 22:18 ` Paul Eggert
2011-11-29 2:07 ` Stefan Monnier
2011-11-29 3:37 ` Dmitry Antipov
2011-11-29 8:50 ` Paul Eggert
2011-11-30 5:37 ` Dmitry Antipov
2011-11-30 9:35 ` Paul Eggert
2011-11-30 16:43 ` Ken Raeburn
2011-11-30 21:44 ` Paul Eggert
2011-11-29 3:17 ` Dmitry Antipov
2011-11-29 5:29 ` Dmitry Antipov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=046388F1-7414-4B68-A870-20ADC9FB5C8C@raeburn.org \
--to=raeburn@raeburn.org \
--cc=emacs-devel@gnu.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).