This is the mail archive of the 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 12/14/2015 1:53 AM, Andrew Haley wrote:
> This just seems like another argument for deprecating basic asm and pushing people to extended.
Yes.  I am not arguing against deprecation.  We should do that.

You know, there are several people who seem to generally support this direction. Not enough to call it a consensus, but perhaps the beginning of one:

- Andrew Haley
- David Wohlferd
- Richard Henderson
- Segher Boessenkool
- Bernd Schmidt

Anyone else want to add their name here?

Maybe it's the implementation details that have other people concerned. My thought is that for v6 we change the docs to say something like:

Unlike top level, using basic asm within a function is deprecated. No new code should use this feature, but should use extended asm instead. Existing code should begin replacing such usage. Instances of affected code can be found using -Wonly-top-basic-asm. For help making this conversion, see "How to convert Basic asm to Extended asm."

With this, we only need to add the warning as a non-default. This will (hopefully) stop new users from using this, and can begin the work of removing it from existing code.

The problem with that approach is that (I'm told) some people don't read the docs. Imagine that. Such being the case, they won't even know this is happening. That's why I think that in the next phase 1 (v7?), we should change the warning to 'on' by default (or maybe as part of -Wall?). People will still be able to override it with no-, but at least it will raise awareness and chase more of it out of people's code.

What about the final step of actually removing support for basic asm in a function as some people propose? Should we really do this? If so, when? That's a more difficult question. If we make the warning a default in v7, then it would be *at least* v8 before this should be considered. Trying to make any plan that far ahead seems... optimistic. Perhaps by then we'll have more feedback upon which to make a decision.

We *could* be more aggressive and start right off with making the warning 'on' by default. But to give people the best chance to prepare, perhaps starting with the non-default is best.

Even if we don't all agree about _removing_ "basic asm in a function," can we find consensus that having less of it is a good thing? Because this approach gets us that.


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