Learn AI, Data Science & Business — Earn Certificates That Get You Hired
CISSP MasterClass with a true CAT exam simulator
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This talk explains undefined behavior in C++, illustrating its possible effects with examples such as signed integer overflow, overlapping buffers, and uninitialized variables. It also examines how compilers optimize code and how undefined behavior relates to C++ language semantics.
Syllabus
Intro
Boost Lists
What is undefined behavior
Examples of what could happen
Array example
Signed integer overflow
Example program crashes
Compiler optimizations
Can you order pointers
Is this a new thing
Copy with overlapping buffers
Modulo bugs
Ignoring integer overflow
Uninitialized variables
Warnings as errors
Uninitialized variable
Uninitialized
Why do we do this
Performance and code size
Language semantics
Types of undefined behavior
Is undefined behavior legal
History of undefined behavior
Search theory
Printing
Taught by
CppNow