C++ Compiler Flags for Development
Channel:
Subscribers:
2,650
Published on ● Video Link: https://www.youtube.com/watch?v=ruFzOtPoGgI
I split the lecture in two since this first part on compiler flags for safe development is worth its own lecture. C++ defaults to "fast and unsafe" for all of its options. Today I showed how to make C++ "slow and safe" for development, which gives you basically the same safety as Java without actually having to use Java.
I have been spreading the word about ASAN (Address Sanitizer) for years, and even though word has been spreading, it's still worth emphasizing that everyone should know about compiling with -fsanitize=address when doing development to check for memory errors at runtime.
The Safe Standard Library is also something not well known by most people, and so turning that on when doing development is also a really good idea.
Other Videos By Bill Kerney
2024-02-07 | C++ Linked Lists |
2024-02-05 | C++: Operators and Type Conversion with Constructors |
2024-02-03 | C++ Test Driven Development using Gtest |
2024-02-03 | Managing Computer Science Projects is Hard |
2024-01-31 | Big O Notation |
2024-01-31 | C++ Operators |
2024-01-29 | C++ Timing Code, Benchmarking, UNIX Shell Scripting Automation |
2024-01-26 | Make a Makefile |
2024-01-24 | C++: Adding Iterator Support to our Vector Class |
2024-01-22 | C++ Rule of 3/5 and Vectors |
2024-01-22 | C++ Compiler Flags for Development |
2024-01-17 | Installing a Nerd Font on Windows |
2024-01-17 | Classes in C++ |
2024-01-10 | Review of First Semester C++ |
2023-12-19 | Advent of Code Day 1 (Worked Solution Parts 1 and 2) |
2023-12-19 | Advent of Code Day 16 (Worked Solution for Parts 1 and 2) |
2023-12-01 | Keith: The C++ Mascot |
2023-11-30 | Make a Metahuman Your Avatar |
2023-11-30 | UE5 Level Sequencer: Foosball Time |
2023-11-29 | Java for C++ Programmers |
2023-11-28 | Discussion of MoCap and Metahuman Creator |
Tags:
address sanitizer
asan
ubsan
g++
safe standard library
compiler flags