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: basic asm and memory clobbers - Proposed solution


On 11/30/2015 4:01 AM, Andrew Haley wrote:
>> There is a way for people to be clear about what they want to clobber,
>> and that's to use extended asm. The way to clear up the ambiguity is to >> start deprecating basic asm, not to add to the confusion by changing its
>> behavior after all these years.
>
> Well, I disagree.  The warning is good, but so is the memory clobber.
> They're not exclusive.

As Richard Henderson put it: "I'd be perfectly happy to deprecate and later completely remove basic asm within functions."

So my intent is that today's optional warning becomes tomorrow's default warning which eventually turns into a fatal error. We could speed that up a bit by making it a default warning now and a fatal error as soon as we re-enter phase 1. I just thought it might be better to update the docs now and delay the change to give more of a heads up.

Yes, we could pursue both clobbering and completely removing at the same time, but I don't think we should. Since (currently) basic asm always has no clobbers describing how to update basic asm to extended is fairly simple: To get the same behavior in extended as you used to get from basic, just add a colon. If some versions of gcc perform clobbers, then knowing how to convert gets way harder.

dw


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