[GCC-XML] Functions that takes array as argument - small advice needed

Brad King brad.king at kitware.com
Tue Apr 11 14:49:54 EDT 2006


Roman Yakovenko wrote:
> Hi. I have small problem with xml generated by GCC-XML.
> Please consider next use case:
> 
> void do_smth( int array[23] );
> 
> GCC-XML generates xml, where it presents function argument as pointer
> to integer.
> 
> I understand that this is a correct behaviour.
> 
> I created code generator based on GCC-XML for boost.python library.  The fact,
> that the information ( array and size ) is missed, makes code
> generator less powerful
> and forces users to write code.
> 
> What solution can you propose? Can GCC-XML write some additional information
> about arguments? May be the whole argument text ( int array[23] ) as is?

I would love to fix this, but GCC throws away the information before the 
dump code sees it.  The filename and line number for the function decl 
and argument decl are included in the output.  You might be able to use 
this to go back and parse the information out of the source directly.

-Brad



More information about the gccxml mailing list