On 4. 11. 2014 13:07, Gintautas Miliauskas wrote:
> But running it just prints "hi", no indications of a crash or anything, 
> regardless of the value of the MSYS variable:

Either the compiler, or C library is too smart for this. I'd guess your 
compiler is working with undefined behavior optimizations, because with my 
compiler, I get both "hi" and "bye" (or not, when I pass -Og). Try this code:

#include <stdio.h>
int main() {
  printf("hi\n");
  ((void(*)())(0))();
  printf("bye\n");
  return 0;
}


-- 
David Macek
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to