This is the mail archive of the gcc-patches@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: [trans-mem] PR46941: Mark new/delete operators as transaction_pure


On Jan 18, 2011, at 7:34 AM, Richard Guenther wrote:
> Btw, we've virorously fought adding a malloc attribute here for years
> but C++ maintainers keep arguing people can arbitrarily override
> this function.  So how's it now suddenly transaction-safe?

I think the way this is phrased can misled people that aren't skilled in the art of language standards into misunderstanding the issue and base language standard itself.

I think a better way to express this would be to recognize that the language api standard itself gets to set the requirements for replacement functions, and in particular, the transation mem api standard gets to set the requirements of the replacement functions, and once that is done, the code change in the compiler is both trivial and correct (though, not necessarily necessary) by definition.

So, in short, this change is all about the requirements of trans-mem language standard.  The replacement functions cannot have arbitrary behavior and result in a program where the standard places _any_ requirements on behavior of that program.


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