annotate tests/testincludes/std/stdarg.d @ 1596:42fc0d955a0d

Updated runtest to always rebuild libtangobos-partial.a in case of updates. Changed std.stdarg to import ldc.vararg so it has the correct implementation.
author Robert Clipsham <robert@octarineparrot.com>
date Sun, 15 Nov 2009 13:22:02 +0000
parents 628433c343b4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1595
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
1
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
2 /*
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
3 * Placed in public domain.
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
4 * Written by Hauke Duden and Walter Bright
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
5 */
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
6
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
7 /* This is for use with variable argument lists with extern(D) linkage. */
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
8
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
9 module std.stdarg;
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
10
1596
42fc0d955a0d Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents: 1595
diff changeset
11 version(LDC)
42fc0d955a0d Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents: 1595
diff changeset
12 {
42fc0d955a0d Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents: 1595
diff changeset
13 public import ldc.vararg;
42fc0d955a0d Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents: 1595
diff changeset
14 }
42fc0d955a0d Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents: 1595
diff changeset
15 else
42fc0d955a0d Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents: 1595
diff changeset
16 {
42fc0d955a0d Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents: 1595
diff changeset
17
1595
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
18 alias void* va_list;
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
19
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
20 template va_arg(T)
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
21 {
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
22 T va_arg(inout va_list _argptr)
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
23 {
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
24 T arg = *cast(T*)_argptr;
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
25 _argptr = _argptr + ((T.sizeof + int.sizeof - 1) & ~(int.sizeof - 1));
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
26 return arg;
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
27 }
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
28 }
628433c343b4 Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff changeset
29
1596
42fc0d955a0d Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents: 1595
diff changeset
30 }