This is the mail archive of the
mailing list for the GCC project.
Re: basic asm and memory clobbers - Proposed solution
- From: David Wohlferd <dw at LimeGreenSocks dot com>
- To: Paul_Koning at Dell dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 16 Dec 2015 17:41:25 -0800
- Subject: Re: basic asm and memory clobbers - Proposed solution
- Authentication-results: sourceware.org; auth=none
- References: <56552209 dot 1020306 at LimeGreenSocks dot com> <56592801 dot 9010606 at LimeGreenSocks dot com> <565DC5F4 dot 6080804 at foss dot arm dot com> <565E1E37 dot 9080609 at LimeGreenSocks dot com> <alpine dot DEB dot 2 dot 10 dot 1512012323160 dot 12604 at digraph dot polyomino dot org dot uk> <565E6862 dot 7070401 at redhat dot com> <566B4BA1 dot 8000509 at LimeGreenSocks dot com> <566BEE35 dot 6070804 at redhat dot com> <566D0CE6 dot 6090905 at LimeGreenSocks dot com> <566E9191 dot 9030106 at redhat dot com> <567092B9 dot 6020703 at LimeGreenSocks dot com> <6F27E197-64F5-42B2-BC5C-289AA8221CAA at dell dot com>
On 12/15/2015 5:01 PM, Paul_Koning@Dell.com wrote:
On Dec 15, 2015, at 5:22 PM, David Wohlferd <dw@LimeGreenSocks.com> wrote:
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?
No, but I want to speak in opposition.
"Deprecate" means two things: warn now, remove later.
Yup. That's what I'm proposing. Although "later" could be a decade
down the road. That's how long 24414 has been sitting.
For reasons stated by others, I object to "remove later".
So "warn now, remove never" I would support, but not "deprecate".
So how about:
- Update the basic asm docs to describe basic asm's current (and
historical) semantics (ie clobber nothing).
- Emphasize how that might be different from users' expectations or the
behavior of other compilers.
- Warn that this could change in future versions of gcc. To avoid
impacts from this change, use extended.
- Mention -Wonly-top-basic-asm as a way to locate affected statements.
Would that be something you could support?
What's your take on making -Wonly-top-basic-asm a default (either now or
v7)? Is making it a non-default a waste of time because no one will
ever see it? Or is making it a default too aggressive? What about
adding it to -Wall?