r/cpp • • Jul 29 '26

C++26: Reducing undefined behaviour

https://www.sandordargo.com/blog/2026/07/29/cpp26-reduces-undefined-behaviour
91 Upvotes

48 comments sorted by

View all comments

Show parent comment

3

u/SkoomaDentist Antimodern C++, Embedded, Audio Jul 30 '26

The 16-bit cpu was a CSR Bluecore that had barely any documentation even after years of company co-operation and us having signed a dozen ndas. It used a hacked together GCC 3.3 with only one officially supported set of compiler flags (ie. you risked miscompilation if you changed any of the wrong ones). I don’t miss it one bit.

I’ve never used C2000 but did briefly touch C5000 dsps and that convinced me that whoever designed them was both insane and an idiot for exposing the internal pipeline to the programmer when writing asm (not an uncommon thing to do on dsps). Imagine having to manually take care to avoid any and all pipeline hazards and the debugger only showing new register contents after 2-3 cycle delay (except when running in an emulator which didn’t simulate the pipeline, thus producing different results for some code).