does GCC support __assume, __noop and _ReturnAddress?

Ian Lance Taylor ian@airs.com
Mon Aug 29 22:41:00 GMT 2005


"Rupert Wood" <me@rupey.net> writes:

> Daniel Berlin wrote: 
> 
> > i'm not sure what nop does
> > Does it really output a nop to the instruction stream?
> 
> It appears to just throw its arguments away
> 
>     http://msdn.microsoft.com/library/en-us/vclang/html/vcref__noop.asp
> 
>     The __noop intrinsic specifies that a function should be ignored
>     and the argument list unevaluated. It is intended for use in
>     global debug functions that take a variable number of arguments.
> 
> I'm not a preprocessor guru (or a GCC-builtins guru) so I don't know what to
> suggest :-/

Sounds like one could just do
    #define __noop(...)

Looking at the other functions from that link, gcc doesn't have
anything exactly like __assume.  gcc has __builtin_expect, but that is
not the same.  __assume is stronger than __builtin_expect.

_ReturnAddress() is the same as gcc's __builtin_return_address(0).

Ian



More information about the Gcc-help mailing list