Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Undefined Behavior in C++ - What Is It, and Why Do You Care?

CppNow via YouTube

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

Reviews

Start your review of Undefined Behavior in C++ - What Is It, and Why Do You Care?

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.