[FFmpeg-devel] [PATCH] Make DECLARE_ALIGNED macros take array specifiers as separate argument

Reimar Döffinger Reimar.Doeffinger
Tue Oct 27 20:00:23 CET 2009


On Tue, Oct 27, 2009 at 06:01:39PM +0000, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> > On Sun, Oct 18, 2009 at 04:41:09PM +0100, M?ns Rullg?rd wrote:
> >> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> >> > On Sun, Oct 18, 2009 at 04:19:55PM +0100, Mans Rullgard wrote:
> >> >> The macro implementation might need the name of the variable being
> >> >> declared for compiler-specific syntax.  Adding an optional fourth
> >> >> argument allows us to pass the name and, if present, array specifiers
> >> >> as separate arguments.
> >> >
> >> > Could you be more specific on the syntax? If possible moving the
> >> > array specifiers just outside the DECLARE_ALIGNED would look nicer IMO.
> >> 
> >> I don't think that will work.  It certainly will not work with another
> >> patch I'm preparing.  What's so bad about this anyway?
> >
> > Sorry, old thread.
> > Bad things about it:
> > 1) I think it looks quite ugly
> 
> I don't.  It is also a prerequisite for compiling FFmpeg with TI
> compilers.

Don't worry, I wasn't going to object on that grounds, I just considered
it reason enough to ask if there's an alternative.
Could you give us an example for the syntax the TI compiler needs?
In principle I guess it's ok, though checking if someone has a better
idea can't hurt I'd think...

> > 2) except for DEBUG stuff it would be the first/only use of vararg
> > macros, no idea how well they are supported, though at least MPlayer
> > uses the ##args syntax for gcc, so __VA_ARGS__ might not work
> > e.g. with 2.95?
> 
> It works fine with gcc 2.95.

Good. Strange, I wonder what that ifdef in MPlayer is good for then.
Maybe time to get rid of it and see...
Does anyone else know of any compiler that has/had issues with vararg
macros? I think the Microsoft one does, but we don't care about that IIRC.



More information about the ffmpeg-devel mailing list