This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: cpp question
- From: LLeweLLyn Reese <llewelly at lifesupport dot shutdown dot com>
- To: "Mack Lobell" <macklobell at hotmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 01 Jun 2003 22:47:07 -0700
- Subject: Re: cpp question
- References: <Law14-F26Qq5pneeFUt00027839@hotmail.com>
"Mack Lobell" <macklobell@hotmail.com> writes:
> Hi,
>
> is there a way to define macros inside macros?
No.
>
> I'll give an example of what i want to do:
> #define MY_MACRO(_something_) \
> #define _something_ ## _FUNNY struct _something_ { int x;}
>
> Maybe there is a smarter/better way of doing this??
[snip]
I don't know - you didn't say what your end goal is. Perhaps you might
find something useful in the boost preprocessor lib:
http://boost.org/libs/preprocessor/doc/contents.html