[GCC-XML] another set of questions after new tests

Stefan Strasser sstrasser at systemhaus-gruppe.de
Fri Mar 18 07:12:28 EST 2005


Nicolas Hognon schrieb:

> 2.  extern="1"
> What does it means ?
> What is an extern variable/method ?
> 

that it is not defined in this translation unit.
e.g. void function();
or extern int a;

> 3. incomplete="1" and class forward

Q:

> Wwhat does incomplete means ?
A:

 > is
> forward
declaration

> 
> 4. What is the different between Class and Struct for gcc-xml ?
> 

there is no difference in c++ other than the default access specifiers 
for members and base specifiers is "public" in structs. so you can 
ignore the difference in gccxml output I think since it also exports the 
access specifier if it is the default.

> So I wrote the following code
> 
> template <class T>
> class RefPtr
> {

> };
> 
> 
> typedef RefPtr<Object> ObjectPtr;
> 
> But there is no other reference to the RefPtr class.

looks like gcc only instantiates the member functions if you create an 
object from it:

int main(){ ABC<int> a; } // member functions of ABC in output
int main(){ ABC<int> *a; } //ABC<int> in output, not its member functions


-- 
Stefan Strasser



More information about the gccxml mailing list