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: rfc: macros accepting constructors


This discussion went off topic to the question of extensions to various parts of cpp. However, the original problem, which was that

#define ARRAY(x,e) int x [] = e;
ARRAY(x,{1,2,3,4})

doesn't do what the programmer probably wanted, I would solve like this:

#define AND ,
ARRAY(x,{1 AND 2 AND 3 AND 4})



A Malton



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