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 default macros in case of c++11
g++ -dM -E -x c++ -std=c++11 - < /dev/null
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s