As part of a project to clarify what behaviour of C implementations is
actually relied upon in modern practice, and what behaviour is
guaranteed by current mainstream implementations, we recently
distributed a survey of 15 questions about C, What is C in practice? (Cerberus survey v2.2).
We were asking what C is in current mainstream practice: the behaviour
that programmers assume they can rely on, the behaviour provided by
mainstream compilers, and the idioms used in existing code, especially
systems code. We were *not* asking what the ISO C standard permits,
which is often more restrictive, or about obsolete or obscure hardware
or compilers. We focussed on the behaviour of memory and pointers.
We've had around 300 responses, including many compiler and OS
developers, and the results are summarised below, or on the web at
Cerberus (which also has more details).
For many questions the outcome seems clear, but for some, especially
1, 2, 9, 10, and 11, major open questions about current compiler
behaviour remain; we'd greatly appreciate informed comments on those
from the relevant compiler developers (or other experts).
If you can answer these, please reply to the llvm-dev thread or by
mailing the Cerberus mailing list:
Kayvan Memarian and Peter Sewell (University of Cambridge)
What is C in practice? (Cerberus survey): Conclusions