Exploring some more useful compiler options
Up until now, we have been compiling our programs with just the -o output_file
option. Your compiler, whether gcc
, clang
, or icc
, probably unbeknownst to you before this point, has a bewildering array of options.
If you are curious, type cc -help
into your command shell and see what spews out. Tread lightly! If you do this, just understand that you will never need the vast majority of those options. Some of these options are for the compiler only; others are passed on to the linker only. They are there for both very specialized system software configurations and for the compiler and linker writers.
If you are using a Unix or Unix-like system, type man cc
in the command shell to see a more reasonable list of options and their usage.
The most important of these options, and the one we will use from now on, is -std=c17
or -std=c11
. The ...