3.5. Options Controlling C++ Dialect
3.5 Options Controlling C++ Dialect
This section describes the command-line options that are only meaningful for C++ programs. You can also use most of the GNU compiler options regardless of what language your program is in. For example, you might compile a file firstClass.C
like this:
g++ -g -fstrict-enums -O -c firstClass.C
In this example, only -fstrict-enums
is an option meant only for C++ programs; you can use the other options with any language supported by GCC.
Some options for compiling C programs, such as -std
, are also relevant for C++ programs. See Options Controlling C Dialect.
Here is a list of options that are only for compiling C++ programs:
-
-fabi-version=
登录查看完整内容