~/talk

Storage Duration and Linkage in C and C++

Talkat NDC TechTown 2019 · 2019-09-02..09-05· [c-and-cpp]
slides:none on file

Explains why names are resolved per translation unit and how the linker uses external linkage to merge definitions; shows that extern without an initializer is a non‑defining declaration while extern with an initializer allocates storage. Demonstrates that static sometimes changes linkage, sometimes storage duration, and that C++ static member functions remove the implicit this parameter rather than change storage. Gives concrete examples: file‑scope totals with static vs extern, const objects having internal linkage in C++ so header constants work, and inline rules for one‑definition behavior.

AI-written summary · about

  1. 0:00Start
  2. 8:43Translation Units and Object Modules
  3. 14:17Scope Regions in C
  4. 20:14Storage Class Specifiers
  5. 26:40Object Declarations and Definitions
  6. 31:26Storage Duration
  7. 37:09Internal Linkage
  8. 40:47No Linkage
  9. 41:48A Conceptual Model
  10. 43:19Storage-Class Specifiers and Functions
  11. 47:58The Curious Behavior of extern
  12. 52:10Linkage for Const Objects
  13. 55:02Inline Functions
  14. 57:23Key Points
~/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.