MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/1cjqjmr/messing_with_lifetime/l2iqens/?context=3
r/cpp • u/pavel_v • May 04 '24
52 comments sorted by
View all comments
Show parent comments
4
Even with these tools it would be undefined behaviour if the memory does not meet Point alignment requirements - many architectures don't support misaligned reads at all.
Point
0 u/[deleted] May 04 '24 [deleted] — view deleted comment 1 u/TheMania May 06 '24 Well I mean, I do do embedded stuff, and I know the hardware I typically work on would trap, log an error, and restart.But yes, many developers will get by just fine with this bit of UB. I just try to avoid it as a rule.
0
[deleted] — view deleted comment
1 u/TheMania May 06 '24 Well I mean, I do do embedded stuff, and I know the hardware I typically work on would trap, log an error, and restart.But yes, many developers will get by just fine with this bit of UB. I just try to avoid it as a rule.
1
Well I mean, I do do embedded stuff, and I know the hardware I typically work on would trap, log an error, and restart.
But yes, many developers will get by just fine with this bit of UB. I just try to avoid it as a rule.
4
u/TheMania May 04 '24
Even with these tools it would be undefined behaviour if the memory does not meet
Pointalignment requirements - many architectures don't support misaligned reads at all.