~/talk

“Which Machine Am I Coding To?”

Talkat CppCon 2017 · 2017-09-24..09-29· [compilers-and-language-design]
links:none on file
slides:none on file

Explains that C++ targets a formal C++ abstract machine not real hardware, documents the as-if rule that lets compilers remove dead computation (example: three loop forms optimized away at -O2), and details nondeterminism like unspecified evaluation order, implementation-defined sizes (char bits may not be eight), and pointer comparison rules. Demonstrates a concrete bug: two threads ++ on a plain int sometimes yields fast but wrong results versus slower atomic int; cites Matt Godbolt and Fred’s benchmarks; calls out undefined behavior and observable behavior.

AI-written summary · about

  1. 0:00Intro
  2. 1:50The Abstract...
  3. 7:52C's abstract machine?
  4. 9:12C++'s abstract machine?
  5. 17:27Implementation-defined
  6. 18:59Unspecified elements
  7. 20:19Undefined elements
  8. 22:15Program execution
  9. 24:35The role of main()
  10. 25:36Memory model (short overview)
  11. 30:27Abstract vs concrete machines
  12. 34:07Impact on programming
  13. 38:59Impact on language design
  14. 41:04Tools you should know and use
  15. 41:39References
~/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.