On Thursday 21 January 2010 20:21:31 Jamie Lokier wrote: > Mike Frysinger wrote: > > GCC-2.x has a bug with empty arg expansion in macros. > > > > - fprintf(stderr, "%s:%i: " fmt, __func__, __LINE__, ## args); \ > > + fprintf(stderr, "%s:%i: " fmt, __func__, __LINE__ , ## args); \ > > Assuming it's what it looks like, it's not a GCC-2.x bug, it's the old > GCC varargs behavior, which was documented and behaved like that since > very old versions of GCC.
i'm not really familiar with gcc-2 ... i didnt get into messing with toolchain stuff until like gcc-3.4 era. it looks like a bug to me as gcc-3+ works fine. if you wanted to elaborate ... this one fails: #define debug(fmt, args...) x(fmt, moo, ## args) main(){debug("a");} these work: #define debug(fmt, args...) x(fmt, moo , ## args) main(){debug("a");} #define debug(fmt, args...) x(fmt, ## args) main(){debug("a");} -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev