Clang Hardened Mode Proposal: Prioritizing Security Over Compatibility
2025-08-02

The Clang team proposes a "hardened mode" to enhance the safety and security of C and C++ programs. This mode will unify existing security mechanisms, including enabling various compiler flags, predefined macros, and warnings, and adjusting diagnostic behavior to reduce false positives and prioritize security. The proposal explores several implementation approaches: a configuration file, a separate driver, and orthogonal flags, seeking community feedback on the optimal solution. This mode may break existing code, but the team believes this is a necessary trade-off for improved security, aiming for a low false positive rate.
Development