~/talk

Safer C++ with MISRA-C++-2023

Talkat ACCU 2024 · 2024-04-17..04-20· [testing]
slides:none on file

MISRA‑C++:2023 targets C++17 and rewrites rules to be checkable by static analyzers while allowing justified deviations; it adds a rule forbidding range‑for initializers with more than one function call to avoid a temporary lifetime bug and highlights concrete UB cases like INT_MIN / -1 and the very high probability of signed multiplication overflow. Recommendations are pragmatic: turn on -Wall and treat warnings as errors, use sanitizers and unit tests, prefer strong/enum class types over raw ints, avoid bitfield/union tricks, and consider safe integer libraries (PSS safeints).

AI-written summary · about

  1. 0:00Introduction
  2. 0:10Misra philosophy and safety
  3. 35:45Specific coding rules
  4. 40:05Undecidable rules and diagnostics
  5. 45:48Enumerations and types
  6. 48:49Type system importance
  7. 52:10Integer overflow dangers
  8. 56:46Safe integer libraries
  9. 1:02:13Strong typing and casting
  10. 1:09:28Class design guidelines
  11. 1:12:20Bitfield usage pitfalls
  12. 1:16:48Ref-qualified member functions
  13. 1:22:21Summary and best practices
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.