CompCert is verified in Coq and handles a subset of C. Why not verify a compiler for the full C language?
Think about your answer, then reveal below.
Model answer: Verifying a compiler requires: (1) a formal semantics of the source language (every rule, every edge case), (2) a formal semantics of the target language (the machine/virtual machine), (3) proof that every transformation preserves semantics. Full C has thousands of pages of specification, undefined behavior in many contexts, and complex interactions between features (pointer arithmetic, type casting, volatile access). Verifying all of this is infeasible within reasonable effort. CompCert handles a safe subset of C (excluding undefined behaviors, dangerous casts, etc.), which is suitable for many real applications. Full verification of realistic languages remains an active research area.
This is a fundamental tension in certified compilation: completeness vs. tractability. A complete compiler for full C would be incredibly difficult to verify because the semantics is complex and sometimes underspecified. CompCert made a strategic choice: verify a safe subset thoroughly rather than attempt a fragile claim about the full language. In practice, many critical systems don't use the dangerous corners of C anyway, so CompCert's scope is reasonable. As proof assistant tooling and proof techniques improve, the scope of certified compilers expands.