From: Ibrahim T. <it...@we...> - 2005-06-30 14:30:10
|
Zoran Vasiljevic wrote: > > Am 30.06.2005 um 00:47 schrieb Stephen Deasey: > >> NS_GNUC_NONNULL is only used in the nscheck.h header because I haven't >> had time to sprinkle it anywhere else :-) I think it's a pretty >> useful feature, so I'd like to keep it. >> >> Macro varargs are not supported by any Microsoft compiler? >> > > No. I checked again. No. Neiter does the manual mention it nor does the latest compiler accept it. >> If you really can't find another solution, then redefining >> NS_GNUC_NONNULL to take a single arg should work. It can be called >> multiple times, one for each non-null function argument. But this is >> ugly, so prefer to keep the varargs if you can. > > > Ugly or not, this is what we have and must stick to it. > But, this would mean if you start to utilize the macro > in generic code, you'd have to use it with only one arg, right? There is this old trick - using double parenthesis - to cope with this problem in the code, e.g. #define MYPRINTF(x) printf x MYPRINTF((stderr, "%s\n", "abc")); > > Zoran Ibrahim |