3 ms·
There are a lot of different C compilers (not so many C++), dozens of ISAs (although not as many as before) and ABIs (ditto) and many, many thousands of impleme
by ncmncm 5y ago
There are a lot of different C compilers (not so many C++), dozens of ISAs (although not as many as before) and ABIs (ditto) and many, many thousands of implementations of ISAs and ABIs, all done with widely varying degrees of attention to detail.
There are myriad places for mistakes to manifest. Caches, interrupt behavior, and sleep modes are favorite places for implementation bugs. But bitfields are a place ordinary programmers might still encounter them.
Anybody used to working with buggy one-off chip designs knows all about this. But most programmers are insulated from most bugs. The warning is for them.
- unnah 5y agoAre there other parts of the C language you are avoiding in such an environment, or is it just bitfields? I suppose in any case you'll be using C89 instead of newer language revisions.
- ncmncm 5y agoThere are of course plenty of things people write that have undefined behavior. I personally never code in C anymore; lately I am using C++17. Compiler optimizers are way, way more reliable than back when I used C.