This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc internals question
- From: Ian Lance Taylor <ian at airs dot com>
- To: "Marc E. Fiuczynski" <mef at CS dot Princeton dot EDU>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: 15 Jan 2005 22:08:59 -0500
- Subject: Re: gcc internals question
- References: <NIBBJLJFDHPDIBEEKKLPGEINDGAA.mef@cs.princeton.edu>
"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