On 07/06/2011 08:45 AM, Eric Blake wrote: >> #define _SDT_ARGARRAY(x) (__builtin_classify_type (x) == 14 \ >> || __builtin_classify_type (x) == 5) >> > > Too bad gcc doesn't document this builtin. It's documented in the Internals manual: http://gcc.gnu.org/onlinedocs/gccint/Varargs.html http://gcc.gnu.org/viewcvs/trunk/gcc/typeclass.h?view=markup >> So perhaps you could copy that macro and let your compatibility casting >> do something like this: >> >> #define _SDT_CAST(x) \ >> __builtin_choose_expr (_SDT_ARGARRAY(x), (uintptr_t)(x), (x)) > > That depends on gcc - so we'd have to provide a fallback define to a > plain cast for other compilers. I'll keep that in mind if the current > patch for libvirt (which doesn't use any gcc extensions) proves to be > problematic. Well, sdt.h itself uses such extensions, so you may not get far with very different compilers anyway. But FWIW, it seems to work fine on F15's clang-2.8. > And we may still end up defining away the problem, by just stating > that libvirt requires systemtap 1.4 or newer before libvirt will use > systemtap. I wouldn't blame you, if you can get away with that. We think the current version of SDT is more sane overall, with better flexibility as well as better resulting metadata. Josh -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list