Kai's talk at FOSDEM streaming NOW!

bearophile bearophileHUGS at lycos.com
Sun Feb 2 05:46:49 PST 2014


Paulo Pinto:

> if you want to follow it, go right now to
>
> http://streaming.fosdem.org/

--------------

In the slide n.13, titled "AST" there is:

foreach (a; 1..10) {
     /* stmts */
}


That gets lowered to:

for (int key = 1;
      key < 10; ++key) {
     /* stmts */
}


Then how is this code rewritten?

foreach (immutable a; 1 .. 10) {
     /* stmts */
}

--------------

Slide 21, Integrating AdressSanitizer:

I have tried to compile this code (adapted from this page: 
http://clang.llvm.org/docs/AddressSanitizer.html ):


int main(string[] args) {
     auto array = (new int[100]).ptr;
     delete array;
     return array[args.length];
}


It gives me:

...>ldmd2 -release -noboundscheck -sanitize=address -run test.d
.../mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/bin/ld.exe: 
cannot find -lasan
collect2.exe: error: ld returned 1 exit status
Error: C:\MinGW\bin\gcc.exe failed with status: 1


Bye,
bearophile


More information about the Digitalmars-d mailing list