Closed
Description
Currently Mono is supposed to use C99. As a result, we're relying on platform or compiler intrinsics for some functionality that has been added to the standard since then such as stdatomic.h
.
We should consider upgrading Mono to a more recent language standard.
This came up as part of #88279, for example.
Some concrete things we could take advantage of:
stdatomic.h
for atomic reads/writes, CAS, etc_Alignas
- static assertions
_Noreturn
- possibly thread locals (although the JIT likes to take advantage of understanding TLS layout, so we need to ensure we don't take a perf hit)
Some reasons we might not want to do it:
- Anecdotally, I've heard that MSVC C11 support has some issues - we will need to understand the specific pitfalls to avoid so we don't break
mono-aot-cross
running on Win32 and also Mono on non-Windows Win32 platforms