This is the mail archive of the gcc-help@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]

[BE] How to query attributes of a function being called?


Hi, suppose this test case of C code:

typedef void (*cb_t)(void) __attribute__((callback));

void caller (cb_t cb)
{
    cb();
}

What I need in the backend is a way to query for the attributs that are attaches to callees like 'cb'.

./config/i386/winnt.c uses TARGET_MANGLE_DECL_ASSEMBLER_NAME in order to encode some information in the callee's name, but in my case the call may be indirect as indicated above.

FYI, the attribute indicates that upon calling cb the program will cross a security barrier, so that the caller must take some actions before and after issuing the call to establish some kind of "wall" against the callback.

Thanks, Georg-Johann


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