Search notes:

gcc -v

gcc -v prints the commands executed to run the stages of compilation
In adition, it reports the version number of
The output of -v goes to stderr.

main.c

#include <stdio.h>

int main() {
  printf("Hello world\n");
}
Github repository about-gcc, path: /options/v/main.c

Invoking the compiler with -v

#  vi: ft=sh
#
#  The output of -v is printed to stderr.
#
#  The following command redirects stderr to v.out
#
gcc -v main.c 2> v.out

#
#  Some greps on v.out  
#
grep 'gcc version'           v.out
grep 'Thread model'          v.out
grep 'Configured with'       v.out
grep 'Target'                v.out
grep 'COLLECT_LTO_WRAPPER'   v.out
grep 'COLLECT_GCC'           v.out

#
#   With the .S suffix, cc1 is invoked first with
#   the -E flag
#
gcc -v assembly.S 2> v.out

#
#   With the .i suffix, cc1 is invoked with the -fpreprocessed flag
#
gcc -v already-preprocessed.i 2> v.out
Github repository about-gcc, path: /options/v/invoke_gcc_with_-v

TODO

gcc -### is similar, but does not execute the commands.

See also

GCC options

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759421793, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/C-C-plus-plus/GCC/options/v/index(95): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78