This is the mail archive of the
mailing list for the GCC project.
Re: basic asm and memory clobbers - Proposed solution
- From: Bernd Schmidt <bernds_cb1 at t-online dot de>
- To: David Wohlferd <dw at LimeGreenSocks dot com>, Paul_Koning at Dell dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 17 Dec 2015 15:13:07 +0100
- 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> <567212C5 dot 30106 at LimeGreenSocks dot com>
On 12/17/2015 02:41 AM, David Wohlferd wrote:
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.
Sounds like a pretty reasonable plan.
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?
Depends if anyone has one in system headers I guess. We could try to add
it to -Wall.