This is the mail archive of the gcc@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]

Re: Problem with commas in macro parameters


* Dmitry Yu. Bolkhovityanov wrote on Sun, Nov 06, 2005 at 07:21:56AM CET:
> 
> 	That's probably an old problem, but I haven't found any notion of 
> it in GCC docs. So...

It's one better discussed on the gcc-help mailing list.

>   #define V(value) = value

> 	This works fine, until I try to pass it some complex value:
> 
> D int some_array[2] V({4,5})

If you can limit yourself to C99-aware preprocessors, use
  #define V(...) = __VA_ARGS__

Cheers,
Ralf


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