Unfortunately, I no longer use Visual C ++ (and so I canβt check if this works), but can you try this?
#define MY_CALL(FUN, ...) \ if(prepare(x, y)) { \ int fail[] = {0,} \ FUN(__VA_ARGS__); \ }
Using gcc 4.2, both {0,} and {0} allowed in this context, so if the comma is removed or not, it does not matter. However, I'm not sure if this is generally accepted in a specification, a commonly implemented extension, or something specific to gcc.
If the syntax {0,} allowed by Visual C ++, then this, hopefully, will solve your problem (if I understand correctly that the very last comma before __VA_ARGS__ is what is incorrectly deleted, regardless of where it appears in the syntax) .
Jay Freeman -saurik-
source share