c-cpp-compilers
Installation
SKILL.md
C/C++ Compilers
Guidance for compiling, analyzing, and optimizing C and C++ code with GCC and Clang in 2026.
Reference files
- GCC specifics: gcc.md -- flags, diagnostics, PGO, LTO, error triage
- Clang specifics: clang.md -- diagnostics, optimization remarks, clang-tidy, macOS
- Sanitizers: sanitizers.md -- ASan, UBSan, TSan, MSan, LSan decision tree and reports
- Static analysis: static-analysis.md -- clang-tidy, cppcheck, scan-build, CI integration
- Modern C/C++: modern-cpp.md -- C++20 modules, C++23/26 features, C23, migration
Standards baseline (2026)
| Language | Preferred standard | GCC support | Clang support |
|---|---|---|---|
| C | -std=c23 (or -std=c17 for broad compat) |
GCC 15+ | Clang 18+ |
| C++ | -std=c++23 (or -std=c++20 minimum) |
GCC 14+ | Clang 18+ |