This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Proposed semantics for attributes in C++ (and in C?)


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]