This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Proposed semantics for attributes in C++ (and in C?)
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: mark at codesourcery dot com
- Cc: gcc at gcc dot gnu dot org, joseph at codesourcery dot com
- Date: Sun, 15 Oct 2006 22:23:04 EDT
- Subject: Re: Proposed semantics for attributes in C++ (and in C?)
- References: <4532B25F.9090207@codesourcery.com>
> If the attribute makes any substantive change to S (e.g., changes its
> size, alignment, etc.) then bad things happen. For example, the member
> functions of "S" have expectations about the layout of "S" that are not
> satisfied if they are called with a "T". Depending on the attribute and
> circumstances, we do all manner of bad things, including ICE, generate
> wrong code, etc.
>
> For a while now, I've been promising to propose semantics for these
> constructs.
You might want to take a look at the Ada concept of "freeze point". That's
one approach to a similar problem.