Beginner's Guide
    First Steps
    Input & Output
    Custom Types – Part 1
    Standard Library – Part 1
    Function Objects
    Standard Library – Part 2
    Code Organization
    Custom Types – Part 2
    Generic Programming
    Memory Management
    Software Design Basics

    Compiler Warnings Compiler Warnings Warnings

    • Error = program not compilable
    • Warning = program compilable, but there is a problematic piece of code that might lead to runtime bugs

    Important gcc/clang Options gcc/clang Options gcc Options

    Most Important Options Most Important

    -Wall Highly recommended. You should always use at least this. It doesn't really enable all warnings, but rather the most important ones that don't produce too much false positive noise.
    -Wpedantic Highly recommended. Issue all warnings demanded by strict ISO C++; reject compiler-specific extensions.
    -Wextra Highly recommended.
    -Werror Make all warnings into errors ⇒ any warning will terminate compilation.

    Recommended Set of Options Recommended Recommended

    -Wall -Wconversion -Wextra -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wformat=2 -Wimport -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wstack-protector -Wstrict-null-sentinel -Wswitch-enum -Wundef -Wwrite-strings

    Might be very noisy!

    -Wdisabled-optimization -Wpadded -Wsign-conversion -Wsign-promo -Wstrict-aliasing=2 -Wstrict-overflow=5 -Wunused -Wunused-parameter