GCC – Dump default compile macros

Use following commands if you want to see default macros passed by the compiler  during compilation:

# Compiler default macros in standard build
gcc -dM -E - < /dev/null

# Compiler default macros with optimization level 0
gcc -dM -E -O0 - < /dev/null

# Compiler list warning enabled using following flags
gcc -Wall -Wextra -Q --help=warning # Compiler default macros in case of c++11 g++ -dM -E -x c++ -std=c++11 - < /dev/null