changeset 819:1672d4566595 libavutil

Make DECLARE_ALIGNED macros work with external array specifiers The macro implementation might need the name of the variable being declared for compiler-specific syntax. Moving array specifiers outside the macro invocation allows this to work.
author mru
date Thu, 21 Jan 2010 12:59:22 +0000
parents 2715180d7ffa
children e89d42c1effa
files mem.h
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mem.h	Wed Jan 20 18:54:51 2010 +0000
+++ b/mem.h	Thu Jan 21 12:59:22 2010 +0000
@@ -29,11 +29,11 @@
 #include "common.h"
 
 #if defined(__ICC) || defined(__SUNPRO_C)
-    #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
+    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
     #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v
 #elif defined(__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)))
+    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
+    #define DECLARE_ASM_CONST(n,t,v)    static const t attribute_used __attribute__ ((aligned (n))) v
 #elif defined(_MSC_VER)
     #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