On 07/15/2012 06:09 AM, Ronald S. Bultje wrote:
> That still requires source code modifications, which seems to hit a
> brick wall here.
> 
> I've looked at http://msdn.microsoft.com/en-us/library/ms177415(v=vs.80).aspx
> and http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html, and it's
> clear that something like #define LOCAL_ALIGNED_16(t, v, s, ...) has
> theoretical issues if defined to a function (#define eprintf(format,
> ...) fprintf(stderr, format, __VA_ARGS__) with eprintf("hi\n") becomes
> fprintf(stderr, "hi\n", ), i.e. an empty terminal comma). However,
> both appear to support this form when used on variadic macros (and in
> fact also when used on a vararg functions like fprintf). So I could do
> something like:
> 
> #define LOCAL_ALIGNED_16(t, v, s, ...) LOCAL_ALIGNED_D(16, t, v, s,
> __VA_ARGS__,)
> 
> instead of
> 
> #define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,)
> 
> and to the best of my knowledge, since the called macro itself is
> always variadic also, this should actually work - not just on these
> two compilers, but on any compiler. Is there a specific reason we
> don't use this instead?

Sounds good, thanks for investigating further, we should test this
change and see. But looks promising.

lu


-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to