[GCC-XML] 2 newbie questions about "pseudo"

Stefan Strasser sstrasser at systemhaus-gruppe.de
Fri May 27 15:50:08 EDT 2005


Am Freitag, 27. Mai 2005 21:08 schrieb John Morrison:

> On Friday 27 May 2005 12:04 pm, Brad King wrote:
> > 1.) If the name starts with "__" then you can ignore it because that
> > namespace is reserved for internal implementation details of a compiler.
> >
> > 2.) Look for the "artificial" attribute for members of the global
> > namespace.  This may be a sufficient filter.
>
> The problem with the second one (and presumably the first) is that
> while the types are marked as artificial, the variables (the vtables)
> are not, so I was getting undefined types.  I don't want to write
> Really Clever Software to figure this out, so...

GCC artificial flag is not very consistent, but the test (sourceline != 0) is. 
I don't know if or how gccxml exports the source line of a type declaration 
but I assume it does.

>
> > 3.) Use the -fxml-start option to avoid getting the extra types.  You
> > just specify a starting declaration and the dump will only include
> > things referenced by it.  Nothing references these "pseudo" declarations
> > so they will not be dumped.
>
> How do I ask for just the top-level namespace named "::" and avoid the
> other ones "std" and "__gnu_cxx" ???  "-fxml-start=::" didn't work.

std and __gnu_cxx are the only artificial namespaces GCC creates in any case, 
so you can ignore them by name if you need to.

-- 
Stefan Strasser



More information about the gccxml mailing list