Mercurial > projects > ldc
comparison tangotests/vararg4.d @ 217:0806379a5eca trunk
[svn r233] Added: -oq command line option for writing fully qualified object names.
Added: started support for x86 80bit floating point.
Changed: aggregates passed by value now use the llvm 'byval' parameter attribute, also lays ground work for
using other attributes.
Changed: eliminated a lot more std::vectorS, these showed up pretty much at the top when profiling!
Changed: performed other misc. cleanups.
Changed: halt expression now call the new llvm trap intrinsic instead of an assert(0).
Changed: dstress suite now passes -O0 by default, this only eliminates unreferenced globals, which speeds up
linking quite a bit.
author | lindquist |
---|---|
date | Thu, 05 Jun 2008 06:38:36 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
216:3d022aa016ae | 217:0806379a5eca |
---|---|
1 module tangotests.vararg4; | |
2 | |
3 extern(C) int printf(char*, ...); | |
4 | |
5 struct S | |
6 { | |
7 int i; | |
8 } | |
9 | |
10 void func(...) | |
11 { | |
12 S* sp = cast(S*)_argptr; | |
13 assert(sp.i == 42); | |
14 } | |
15 | |
16 void main() | |
17 { | |
18 printf("1st:\n"); | |
19 { | |
20 S s = S(42); | |
21 func(s); | |
22 } | |
23 printf("ok\n"); | |
24 | |
25 printf("2nd:\n"); | |
26 { | |
27 func(S(42)); | |
28 } | |
29 printf("ok\n"); | |
30 } |