This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

#define in a macro definition


GCC-HELP,

Is it possible with GCC to define an object-like macro within a function-like macro, i.e. this is what I am trying to do...

#define MyMacro(a) \
   #define a##Type 55

Some compilers can do this with a #pragma statement which can simulate a command line option within the source "c" file such as:
#pragma option(-D MyDefinition=5);


I am new to GCC and only just started working with it and so far I like everything I see, but I cannot find a way to accomplish this.

Thanks for any help you can provide.

Sam Guido





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]