Johannes Brunen wrote:
#define decl_() DECL_
#define DECL_FUNCTION(lib) decl_()lib
[snip]
After preprocessing on msvc9 I got the following code:
class ENTITY; DECL_KERN logical is_ENTITY (const ENTITY*);
After preprocessing with gccxml with this command
[snip]
class ENTITY; DECL_ KERN logical is_ ENTITY (const ENTITY*);
I do not think the C preprocessor standard guarantees that
your DECL_FUNCTION macro will concatenate the output of
'decl_()' with 'lib' into a single token. Instead, use the
'##' operator to concatenate:
#define CAT(x,y) CAT_DELAY(x,y)
#define CAT_DELAY(x,y) x##y
#define DECL_FUNCTION(lib) CAT(decl_(),lib)
It should work in any preprocessor.
-Brad
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.gccxml.org/mailman/listinfo/gccxml