[GCC-XML]Ellipsis
James Michael DuPont
mdupont777 at yahoo.com
Thu Aug 8 07:04:00 EDT 2002
I have tested this using the dump translation unit option from gcc3,
it also does not dump the parameters if they are a function pointer,
in fact the function_type has no parameters at all. This is a omission from the tree dumper, and the introspector uses it, so there would be no handling of that either :(
int g(
int status,
int callback_data
);
int f(
void (*callback_addr)(int status, int callback_data),
);
Command :
/lib/gcc-lib/i686-pc-cygwin/3.1.1/cc1 -fdump-translation-unit test.c
Produces for F:
@1 function_decl name: @2 type: @3 srcp: test.c:8
chan: @4 undefined extern
@2 identifier_node strg: f lngt: 1
@3 function_type size: @5 algn: 64 retn: @6
and for G:
@4 function_decl name: @7 type: @8 srcp: test.c:4
chan: @9 undefined extern
@5 integer_cst type: @10 low : 64
@6 integer_type name: @11 size: @12 algn: 32
prec: 32 min : @13 max : @14
@7 identifier_node strg: g lngt: 1
@8 function_type size: @5 algn: 64 retn: @6
prms: @15
@15 tree_list valu: @6 chan: @23
@23 tree_list valu: @6 chan: @31
@31 tree_list valu: @39
@39 void_type name: @47 algn: 8
Brad King
wrote:Kevin,
> Why is this the body of some Method elements and not others and what
> exactly is omitted?
The elements nested inside function and method elements are the arguments
to the method. If the method is declared with an ellipsis (the ...
argument), the ellipsis element represents it.
For example:
void Function(...);
produces
returns="_3" context="_1"
location="f0:1" extern="1">
James Michael DuPont
http://introspector.sourceforge.net/
---------------------------------
Do You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20020808/14409a2b/attachment.html>
More information about the gccxml
mailing list