But there is an interesting catch to it: because C is so important, and programmers at large know so little "real C", vendors do their damndest to make it work for them.
A well-known microcontroller forum in Germany is constantly pushing that you need to make your code safe in the case of concurrent access to a variable by a main loop and an interrupt. By making it volatile.
Strictly speaking that's plain wrong. You need some kind of mutex.
Practically speaking, no embedded C compiler vendor would dare use an "optimizing opportunity" and surprise his customers there.