[GCC-XML] Trouble with __attribute and templates

Brad King brad.king at kitware.com
Wed Jun 3 14:03:28 EDT 2009


J.-P. Pellet wrote:
> I'm having problems tagging a template with a gccxml attribute.
> 
> If I tag a class like this:
> 
>   class __attribute((gccxml("MyAttribute"))) SomeClass {};
> 
> then, sure enough, I get MyAttribute in gccxml's output. However, if I try
> 
>   template<typename T>
>   class __attribute((gccxml("MyAttribute"))) SomeClass {};
> 
> then MyAttribute seems to be lost when a template is instantiated. What 
> am I doing wrong here?

I don't know what gcc does with attributes on templates during
instantiation.  I know gccxml does nothing special about it.

You'll have to check the standard GCC documentation for __attribute.

Good luck,
-Brad




More information about the gccxml mailing list