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]

AW: basic asm and memory clobbers - Proposed solution


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.

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