Browse code

try another fix for weird i386 where alignof( double) is 8 and alignof( struct { double x;}) is 4

Nat! authored on 04-07-2016 16:17:43
Showing 1 changed files
... ...
@@ -73,7 +73,7 @@ static inline char  *_mulle_vararg_int_aligned_pointer( mulle_vararg_list *args,
73 73
    if( size < sizeof( int))
74 74
    {
75 75
       size  = sizeof( int);
76
-      align = alignof( int);
76
+      align = alignof( struct{ int x; });  // weirdness for i386
77 77
    }
78 78
    
79 79
    q       = mulle_align_pointer( args->p, align);
... ...
@@ -123,7 +123,7 @@ static inline char  *_mulle_vararg_double_aligned_pointer( mulle_vararg_list *ar
123 123
    if( size < sizeof( double))
124 124
    {
125 125
       size  = sizeof( double);
126
-      align = alignof( double);
126
+      align = alignof( struct{ double x; });  // weirdness for i386
127 127
    }
128 128
    
129 129
    q       = mulle_align_pointer( args->p, align);