Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] question about parsing __attribute__


I'm curious about the way in which  __attribute__ and __declspec are
handled by the dom parser. It is my understanding that these extensions
were designed to be portable by eliding them using macros, for example:

#ifndef __GNUC__
#  define  __attribute__(x)  /*NOTHING*/

So why are they implemented as methods in the dom parser rather than as
macros? I see that they used to be defined as macros in

The code that parses these extensions does not touch the AST at all, it
just recognizes the constructs and keeps parsing. Is it there because of
some future plans? Thanks.

Mike Kucera
Software Developer
IBM CDT Team, Toronto

Back to the top