Mercurial > projects > ldc
annotate test/b.d @ 94:61615fa85940 trunk
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
Added support for array .sort and .reverse properties.
Fixed some bugs with pointer arithmetic.
Disabled some DMD AST optimizations that was messing things up, destroying valuable information.
Added a KDevelop project file, this is what I use for coding LLVMDC now :)
Other minor stuff.
author | lindquist |
---|---|
date | Mon, 12 Nov 2007 06:32:46 +0100 |
parents | 25d4fcce53f4 |
children | d9d5d59873d8 |
rev | line source |
---|---|
1 | 1 module b; |
2 | |
3 struct S | |
4 { | |
5 int i; | |
6 float[4] f; | |
7 } | |
8 | |
9 void main() | |
10 { | |
11 S s; | |
12 int i = s.i; | |
87 | 13 int* p = &s.i; |
1 | 14 *p = 42; |
15 printf("%d == %d\n", *p, s.i); | |
16 | |
17 float* f = &s.f[0]; | |
18 printf("%f == %f\n", *f, s.f[0]); | |
19 *f = 3.1415; | |
20 printf("%f == %f\n", *f, s.f[0]); | |
21 s.f[0] = 123.456; | |
87 | 22 printf("%f == %f\n", *f, s.f[0]); |
1 | 23 } |