This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
AW: basic asm and memory clobbers - Proposed solution
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: David Brown <david at westcontrol dot com>, Andrew Haley <aph at redhat dot com>, "David Wohlferd" <dw at LimeGreenSocks dot com>, Joseph Myers <joseph at codesourcery dot com>
- Cc: Jeff Law <law at redhat dot com>, "rth at redhat dot com" <rth at redhat dot com>, "Richard Earnshaw" <Richard dot Earnshaw at foss dot arm dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "Paul_Koning at Dell dot com" <Paul_Koning at Dell dot com>, "jakub at redhat dot com" <jakub at redhat dot com>, "rth at gcc dot gnu dot org" <rth at gcc dot gnu dot org>, "pinskia at gcc dot gnu dot org" <pinskia at gcc dot gnu dot org>, Segher Boessenkool <segher at kernel dot crashing dot org>, Ian Lance Taylor <iant at google dot com>, "Sandra Loosemore" <sandra at codesourcery dot com>, Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Thu, 17 Dec 2015 19:30:47 +0000
- Subject: AW: basic asm and memory clobbers - Proposed solution
- Authentication-results: sourceware.org; auth=none
- Authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=hotmail.de;
- 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> <alpine dot DEB dot 2 dot 10 dot 1512152238290 dot 10678 at digraph dot polyomino dot org dot uk> <567212B0 dot 3060402 at LimeGreenSocks dot com> <567290E5 dot 4020400 at redhat dot com>,<5672B489 dot 10106 at westcontrol dot com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:23
Hi,
On Thu, 17 Dec 2015 15:13:07, Bernd Schmidt wrote:
> > 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.
Sorry, but if I have to object.
Adding this warning to -Wall is too quickly and will bring the ia64, tilegx and mep ports into trouble.
Each of them invokes some special semantics for basic asm:
mep: mep_interrupt_saved_reg looks for ASM_INPUT in the body, and saves different registers if found.
tilegx: They never wrap {} around inline asm. But extended asm, are handled differently, probably automatically surrounded by braces.
ia64: ASM_INPUT emits stop-bits. extended asm does not the same. That was already mentioned by Segher.
Bernd.