[GCC-XML] Applying attributes

Brad King brad.king at kitware.com
Fri May 30 21:23:58 EDT 2008


Chris Waldron wrote:
> According to the documentation I should be able to apply an attribute to
> a class.  However when I apply an attribute to a class GCC-XML is
> failing to include the "attribute" attribute to the class element.  For
> example I defined the following:
> 
> #ifdef __GCCXML__
> #define GUID(x) __attribute((gccxml("guid", #x)))
> #else
> #define GUID(x)
> #endif
> 
> GUID({BA0A9651-23E6-407a-B19C-5A0A05B97DC9})
> class Rectangle : Object
> {
> public:
>     Rectangle(void);
>     virtual ~Rectangle(void);
> }
> 
> The class element for the Rectangle class is missing the "attribute"
> attribute.
> 
> Can someone take a look?

The gcc syntax to specify attributes for classes is between 'class' and the 
class name:

class GUID({BA0A9651-23E6-407a-B19C-5A0A05B97DC9}) Rectangle : Object

-Brad



More information about the gccxml mailing list