I’m wondering where are gcc macros like builtin_expect , __attribute ((warn_unused_result)) etc. stored ? I needed to create a tag file with ctags , for things like those above.
Thanks !
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
_builtin_expect is a GCC builtin, this means that the compiler has some special code to handle it. It it nowhere really defined; if you care about its implementation, look inside the file
gcc/builtins.c(&builtins.def) of the GCC 4.6 (or future 4.7) compiler source code.Likewise,
__attribute__-s are handled by the compiler.The GCC documentation lists the set of builtins & attributes understood by GCC. Plugins (or MELT extensions) for GCC can augment it.