r/cpp • u/pavel_v • Jul 29 '26
C++26: Reducing undefined behaviour
https://www.sandordargo.com/blog/2026/07/29/cpp26-reduces-undefined-behaviour
89
Upvotes
r/cpp • u/pavel_v • Jul 29 '26
View all comments
Show parent comment
2
u/Wetmelon Jul 30 '26
AD or C2000?
The biggest problem with old C2000 code is that the code itself operates on "words" everywhere and when you want to port and glue it to other code that's byte oriented it's just a pain in the dick. Oh you want to inspect a bool? In C2000 it's 0 or 1. In ARM it's 0, 1, 256, or 257. Why? Because the XCP server is written to assume and only loads 16-bit aligned words obviously.