Skip to main content

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

Hi,

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*/
#endif

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
GCCOldScannerExtensionConfiguration.

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
mkucera@xxxxxxxxxx



Back to the top