<div dir="ltr">Hey,<div>I have question. Does clang take advantage of the fact that calling main or taking address of main function in C++ is undefined behavior?</div><div>I've heard that some compilers do so and AFAIRC I've heard that it was important to some benchmarks.</div><div>I guess compiler can assume the values of globals after calling main, because it knows that it is the first function called after initializing them.</div><div><br></div><div>Is there any optimization that do this in clang?</div><div><br></div><div>Piotr</div></div>