by wyldfire · 5y ago · 0 comments
EDIT: gcc seems to agree with me: you can see the optimized version here[1] and the unoptimzed version if you remove "const".
Isn't it valid to cast to non-const for a const, but only invalid to modify the const through the casted pointer?
Mostly seen in embedded space.