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]

Re: gcc internals question


"Marc E. Fiuczynski" <mef@CS.Princeton.EDU> writes:

> What internal function in gcc tells me the number of args the current
> function has?

I suppose you can extract it from current_function_decl.  Walk down
the list DECL_ARGUMENTS (current_function_decl).  If it doesn't end in
void_list_node, it's a varargs function.  There are various examples
in the sources, e.g., do_warn_unused_parameter().

Ian


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