[FFmpeg-cvslog] r11889 - trunk/libavutil/mem.h

Diego Biurrun diego
Mon Feb 11 08:52:21 CET 2008


On Sun, Feb 10, 2008 at 09:19:24PM -0500, Rich Felker wrote:
> On Sun, Feb 10, 2008 at 10:16:10PM +0100, Diego Biurrun wrote:
> > I suggest the following, which is farm more readable IMO even if -
> > strictly speaking - it duplicates one line:
> > 
> > #ifdef __GNUC__
> >   #define DECLARE_ALIGNED(n,t,v)       t v __attribute__ ((aligned (n)))
> >   #define DECLARE_ASM_CONST(n,t,v)     static const t v attribute_used __attribute__ ((aligned (n)))
> > #elif __ICC
> >   #define DECLARE_ALIGNED(n,t,v)       t v __attribute__ ((aligned (n)))
> >   #define DECLARE_ASM_CONST(n,t,v)     const t __attribute__ ((aligned (n))) v
> > #else
> >   #define DECLARE_ALIGNED(n,t,v)       __declspec(align(n)) t v
> >   #define DECLARE_ASM_CONST(n,t,v)     __declspec(align(n)) static const t v
> > #endif
> 
> Having MSVC crap in the default case is simply broken! This must be
> fixed!

This is the way it is now.  Unfortunately Michael objected against
removing the __declspec default case ...

Diego




More information about the ffmpeg-cvslog mailing list