[GCC-XML]Function attributes.

Brad King brad.king at kitware.com
Wed Aug 13 18:32:20 EDT 2003


Oscar,

> There is a missing feature, though: it's interesting to know some
> attributes for functions and, to a lesser extent, for classes. The
> calling convention is very important. It would be handy to know if a
> given function/class was marked for export with __declspec(dllexport),
> too.

I've just added the support for this.  The XML element for a type will
specify a space-separated list of attributes if any are present.  For a
function type of a pointer declared __stdcall, it will look something like
this:

  type_attributes="__stdcall__"

For a function declaration, there may be both

  decl_attributes="dllexport"

and

  type_attributes="__cdecl__"

attributes because one comes from the function declaration and the other
comes from the type of the function.

You'll have to build gccxml_cc1plus with the CVS version of xml.c as well
as build gccxml from the CVS sources to get the support.

-Brad




More information about the gccxml mailing list