here we try to guess the value of a pointer -- LLVM says we cannot guess it and GCC suspects we canhttps://godbolt.org/g/SFLwz4
-
Show this thread
-
anyone know offhand whether C99 or C11 explicitly justifies LLVM's optimization?
8 replies 0 retweets 0 likesShow this thread -
Replying to @johnregehr
malloc is defined to return a pointer which does not alias any pre-existing object
4 replies 0 retweets 1 like -
If nothing else, malloc returns a pointer to memory suitably aligned for any type, and 0xdeadbeef most definitely is not.
4 replies 1 retweet 3 likes
So if *p and *q alias, they only partly overlap, and the behavior is automatically undefined.
12:02 PM - 1 Nov 2017
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.