you are describing undefined behavior, const value in a scope can't be changed by a current thread, compile with -fstrict-aliasing
Hm. Seems somewhat painful to write assumptions about memory not changing. Looks like it'd require copying the to-be-asssumed-unchanging memory, writing an assumption about it not having changed using memcmp() or such, and the compiler to realize that the copy is unnecessary?
-
-
It's currently in the committee pipeline. Perhaps someone should tell them this is an use-case. ^^
@timur_audio -
TBH my gut feeling is that this would be best represented on the type system level. But that's obviously not a small thing... And anything would help.
- 2 more replies
New conversation -
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.