[Issue 6758] std.c.stdarg problems with 8 or more integer arguments on x86_64

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 2 16:00:26 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6758



--- Comment #4 from Graham <grahamc001uk at yahoo.co.uk> 2011-10-02 15:59:44 PDT ---
Changing every .alignof to .sizeof in the stdarg module appears to be
sufficient to get this code to work in both D1 and D2. Whether this change is
strictly correct for all cases I do not know.

D2
druntime/import/core/stdc

diff stdarg.di.original stdarg.di
91c91
< auto p = cast(size_t)ap.stack_args + T.alignof - 1 & ~(T.alignof - 1);
---
> auto p = cast(size_t)ap.stack_args + T.sizeof - 1 & ~(T.sizeof - 1);
122c122
< auto p = cast(size_t)ap.stack_args + T.alignof - 1 & ~(T.alignof - 1);
---
> auto p = cast(size_t)ap.stack_args + T.sizeof - 1 & ~(T.sizeof - 1);

D1
src/phobos/std/c

diff stdarg.d.original stdarg.d
123c123
<                 auto p = (cast(size_t)ap.stack_args + T.alignof - 1) &
~(T.alignof - 1);
---
>                 auto p = (cast(size_t)ap.stack_args + T.sizeof - 1) & ~(T.sizeof - 1);
152c152
<                         auto p = (cast(size_t)ap.stack_args + T.alignof - 1)
& ~(T.alignof - 1);
---
>                         auto p = (cast(size_t)ap.stack_args + T.sizeof - 1) & ~(T.sizeof - 1);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list