Patch to add new target macro: TARGET_WARN_RETURN_TYPE

Richard Henderson rth@cygnus.com
Wed Mar 31 18:59:00 GMT 1999


On Fri, Mar 19, 1999 at 02:59:49PM -0800, Nick Clifton wrote:
> + #ifdef NAKED_FUNCTION_P
> + 	   && ! NAKED_FUNCTION_P (fndecl)
> + #endif

I would prefer to see this put in "defaults.h" rather than
have an ifdef here.

> : I do wonder, though, whether an `asm' construct or similar that
> : explicitly says "return whatever is already prepared" would be
> : a better approach, e.g. `return __asm__();' or some such thing.
> : I don't know enough about gcc's asm facility to be sure, but,
> : in general, I can see the need for such a construct.
> 
> Or maybe just the ability to mark an asm as generating a return value,
> say by using an attribute.  eg:
> 
>     asm ("ldr r0, #0" ::: "r0") __attribute__((return));

Something like `asm return (...)' wouldn't be too hard to parse.


r~



More information about the Gcc-patches mailing list