search for: 0aef8a64

Displaying 2 results from an estimated 2 matches for "0aef8a64".

2013 Nov 11
0
[LLVMdev] Should remove calling NULL pointer or not
I've definitely seen code like the following in various production code bases: namespace { bool global = false; } class Foo { void modify_global() { global = true; } }; // usually, there's a layer of indirection (or two, or three) here ((Foo*)NULL)->modify_global(); Discussions on StackOverflow seem to clearly indicate that the above code is undefined. Having said that, I
2013 Nov 07
4
[LLVMdev] Should remove calling NULL pointer or not
Hi, For a small case, that calls NULL pointer function. LLVM explicitly converts It to a store because it thinks it is not reachable like calling undefvalue. In InstCombineCalls.cpp:930 I think it is not a right approach because calling null pointer function Will segfault the program. Converting to a store will make program pass Silently. This changes the behavior of a program.