▲ | torstenvl 4 days ago | |||||||||||||
I'm not trying to say anything. I said and meant exactly what I said. No more, no less. Your logic is obviously flawed. There is nothing preventing that optimization in the presence of a forged pointer in bar(). | ||||||||||||||
▲ | gpderetta 4 days ago | parent [-] | |||||||||||||
Either there is no provenance, forging is allowed and the optimization is disallowed; or there is provenance and forging the pointer and attempting to inspect (or modify) the value of *ptr in bar() is UB. | ||||||||||||||
|