At least you can try to use macro expansion for __attribute__(something)
- and then not expand that macro during doxygen processing.
Anyway, if you try to write portable code, you should not have in-place
compiler extensions, which __attribute__ surely is (that means, very few
C/C++ compilers other than gcc will support that keyword). I've solved
this stuff using e.g.:
#ifdef __GNUC__
// Define how to declare functions/methods with printf(3) like semantics.
#define PRINTFLIKE( format_index, arguments_index ) \
__attribute__(( format( printf, (format_index), (arguments_index) ) ))
#else
// Defined as empty macro for all other compilers, and also for doxygen.
#define PRINTFLIKE( format_index, arguments_index )
#endif // __GNUC__
and then I use e.g.
PRINTFLIKE(1,2) char* MyPrintF( const char * const sFormat, ... );
Hariharan wrote:
> Hi All,
> We are trying to document our code based on doxgen scheme, most
> of our data strucutures follow strict alignment restriction and hence we
> have used __attrubute__((aligned(16))) before structure names. This
> confuses doxygen and it thinks that the structure name is actually
> __attribute__, also we have structures and unions inside a strucuture
> that are not perticularly named, how does doxygen take care of such
> senarios?
>
> I saw a patch being submitted in dev list , tried that but it does
> not seem to be of much help.
>
> Any suggestions as to how we could get doxygen to make this work ?
>
>
> Thanks
> -Hariharan
|