4 COMPILER USE

This chapter contains the following sections:

Invocation
Detailed Description of the Compiler Options
Include Files
Pragmas
Compiler Limits

4.1 Invocation

The invocation syntax of the C++ compiler is:

Invocations and examples are given for the DSP563xx/DSP566xx (cp563). Substitute the appropriate executable name for your DSP processor type.

When you use a UNIX shell (Bourne shell, C-shell), arguments containing special characters (such as '( )' and '?') must be enclosed with "" or escaped. The -? option (in the C-shell) becomes: "-?" or -\?.

The C++ compiler accepts a C++ source file name and command line options in random order. A C++ source file must have a .cc, .cxx or .cpp suffix.

Command line options may be specified using either single character option codes (e.g., -o), or keyword options (e.g., --output). A single character option specification consists of a hyphen '-' followed by one or more option characters (e.g., -Ab). If an option requires an argument, the argument may immediately follow the option letter, or may be separated from the option letter by white space. A keyword option specification consists of two hyphens followed by the option keyword (e.g., --strict). Keyword options may be abbreviated by specifying as many of the leading characters of the option name as are needed to uniquely identify an option name (for example, the --wchar_t_keyword option may be abbreviated as --wc). Note that this is not supported by the control program! If an option requires an argument, the argument may be separated from the keyword by white space, or the keyword may be immediately followed by =option. When the second form is used there may not be any white space on either side of the equals sign.

The priority of the options is left-to-right: when two options conflict, the first (most left) one takes effect. The -D and -U options are not considered conflicting options, so they are processed left-to-right for each source file. You can overrule the default output file name with the --gen_c_file_name option.

A summary of the options is given below. The next section describes the options in more detail.

Option Description
-? Display invocation syntax
--alternative_tokens
--no_alternative_tokens

Enable or disable recognition of alternative tokens
--anachronisms
--no_anachronisms

Enable or disable anachronisms
--arg_dep_lookup
--no_arg_dep_lookup

Perform argument dependent lookup of unqualified function names
--array_new_and_delete
--no_array_new_and_delete

Enable or disable support for array new and delete
--auto_instantiation
--no_auto_instantiation
-T


Enable or disable automatic instantiation of templates
--base_assign_op_is_default
--no_base_assign_op_is_default

Enable or disable the anachronism of accepting a copy assignment operator with a base class as a default for the derived class
--bool
--no_bool

Enable or disable recognition of bool
--brief_diagnostics
--no_brief_diagnostics

Enable or disable a shorter form of diagnostic output
--cfront_2.1
-b

Compile C++ compatible with cfront version 2.1
--cfront_3.0 Compile C++ compatible with cfront version 3.0
--class_name_injection
--no_class_name_injection

Add class name to the scope of the class
--comments
-C

Keep comments in the preprocessed output
--const_string_literals
--no_const_string_literals

Make string literals const
--create_pch file Create a precompiled header file with the specified name
--define_macro macro[(parm-list)] [=def]
-Dmacro [(parm-list)][=def]

Define preprocessor macro
--dependencies
-M

Preprocess only. Emit dependencies for make
--diag_suppress tag[,tag]...
--diag_remark tag[,tag]...
--diag_warning tag[,tag]...
--diag_error tag[,tag]...



Override normal error severity
--display_error_number Display error number in diagnostic messages
--distinct_template_signatures
--no_distinct_template_signatures

Disallow or allow normal functions as template instantiation
--dollar
-$

Accept dollar signs in identifiers
--early_tiebreaker Early handling of tie-breakers in overload resolution
--embedded
--no_embedded

Enable or disable support for embedded C++ language extension keywords
--embedded_c++ Enable the diagnostics of noncompliance with the "Embedded C++" subset
--enum_overloading
--no_enum_overloading

Enable or disable operator functions to overload builtin operators on enum-typed operands
--error_limit number
-enumber

Specify maximum number of errors
--error_output efile Send diagnostics to error list file
--exceptions
--no_exceptions
-x


Enable or disable support for exception handling
--explicit
--no_explicit

Enable or disable support for the explicit specifier on constructor declarations
--extended_variadic_macros
--no_extended_variadic_macros

Allow (or disallow) macros with a variable number of arguments and allow the naming of the list
--extern_inline
--no_extern_inline

Enable or disable inline function with external C++ linkage
--force_vtbl Force definition of virtual function tables
--for_init_diff_warning
--no_for_init_diff_warning

Enable or disable warning when old-style for-scoping is used
--friend_injection
--no_friend_injection

Control the visibility of friend declarations
--gen_c_file_name file Specify name of generated C output file
--guiding_decls
--no_guiding_decls

Enable or disable recognition of "guiding declarations" of template functions
--implicit_extern_c_type_conversion
--no_implicit_extern_c_type_conversion
Enable or disable implicit type conversion between external C and C++ function pointers
--implicit_include
--no_implicit_include
-B


Enable or disable implicit inclusion of source files as a method of finding definitions of template entities to be instantiated
--implicit_typename
--no_implicit_typename

Enable or disable implicit determination, from context, whether a template parameter dependent name is a type or nontype
--incl_suffixes suffixes Set the valid suffixes for include files
--include_directory dir
-Idir

Look in directory dir for include files
--inlining
--no_inlining

Enable or disable minimal inlining of function calls
--instantiate mode
-t mode

Control instantiation of external template entities
--instantiation_dir dir Write instantiation files to dir
--late_tiebreaker Late handling of tie-breakers in overload resolution
--list lfile
-L lfile

Generate raw list file lfile
--long_lifetime_temps
--short_lifetime_temps

Select lifetime for temporaries
--long_preserving_rules
--no_long_preserving_rules

Enable or disable K&R arithmetic conversion rules for longs
-M[m|s|r][x|y|l|p][L] Select memory model: mixed, static or reentrant. Select default memory space: X, Y, L or P. Specify stack not in L memory (only for cp56)
-M[24|1624|16|6] [n][x|y|l|p][L] Select memory model: 24-bit, 16/24-bit, 16-bit or DSP566xx. Do not use hardware stack extension. Select default memory space: X, Y, L or P. Specify stack not in L memory (only for cp563)
--namespaces
--no_namespaces

Enable or disable the support for namespaces
--new_for_init New-style for-scoping rules
--no_code_gen
-n

Do syntax checking only
--no_line_commands
-P

Preprocess only. Remove line control information and comments
--nonconst_ref_anachronism
--no_nonconst_ref_anachronism

Enable or disable the anachronism of allowing a reference to nonconst to bind to a class rvalue of the right type
--nonstd_qualifier_deduction
--no_nonstd_qualifier_deduction

Use (or do not use) a non-standard template argument deduction method
--nonstd_using_decl
--no_nonstd_using_decl

Allow or disallow unqualified name in non-member using declaration
--no_preproc_only Specify that a full compilation should be done (not just preprocessing)
--no_use_before_set_warnings
-j

Suppress warnings on local automatic variables that are used before their values are set
--no_warnings
-w

Suppress all warning messages
--old_for_init Old-style for-scoping rules
--old_line_commands Put out line control information in the form # nnn instead of #line nnn
--old_specializations
--no_old_specializations

Enable or disable old-style template specialization
--old_style_preprocessing Forces pcc style preprocessing
--one_instantiation_per_object Create separate instantiation files
--output file
-o file

Specify name of preprocess or intermediate output file
--pch Automatically use and/or create a precompiled header file
--pch_dir dir Specify directory dir in which to search for and/or create a precompiled header file
--pch_messages
--no_pch_messages

Enable or disable the display of a message indicating that a precompiled header file was created or used in the current compilation
--pch_verbose Generate a message when a precompiled header file cannot be used
--pending_instantiations n Maximum number of instantiations for a single template (default 64)
--preinclude file Include file at the beginning of the compilation
--preprocess
-E

Preprocess only. Keep line control information and remove comments
--remarks
-r

Issue remarks
--remove_unneeded_entities
--no_remove_unneeded_entities

Enable or disable the removal of unneeded entities from the generated intermediate C file
--rtti
--no_rtti

Enable or disable support for RTTI (run-time type information)
--signed_chars
-s

Treat all 'char' variables as signed
--special_subscript_cost
--no_special_subscript_cost

Enable or disable a special nonstandard weighting of the conversion to the integral operand of the [] operator in overload resolution.
--strict
-A

Strict ANSI C++. Issue errors on non-ANSI features
--strict_warnings
-a

Strict ANSI C++. Issue warnings on non-ANSI features
--suppress_typeinfo_vars Suppress type info variables in generated C
--suppress_vtbl Suppress definition of virtual function tables
--sys_include dir Look in directory dir for system include files
--timing
-#

Generate compilation timing information
--trace_includes
-H

Preprocess only. Generate list of included files
--tsw_diagnostics
--no_tsw_diagnostics

Enable or disable TASKING style diagnostic messages
--typename
--no_typename

Enable or disable recognition of typename
--undefine_macro macro
-Umacro

Remove preprocessor macro
--unsigned_chars
-u

Treat all 'char' variables as unsigned
--use_pch file Use a precompiled header file of the specified name
--using_std
--no_using_std

Enable or disable implicit use of the std namespace when standard header files are included
--variadic_macros
--no_variadic_macros

Allow (or disallow) macros with a variable number of arguments
--version
-V
-v


Display version header only
--wchar_t_keyword
--no_wchar_t_keyword

Enable or disable recognition of wchar_t as a keyword
--wrap_diagnostics
--no_wrap_diagnostics

Enable or disable wrapping of diagnostic messages
--xref xfile
-X xfile

Generate cross-reference file xfile

Table 4-1: Compiler options (alphabetical)

Description Option
Include options
Look in dir for include files --include_directory dir
-Idir
Look in dir for system include files --sys_include dir
Set the valid suffixes for include files --incl_suffixes suffixes
Include file at the beginning of the compilation --preinclude file
Preprocess options
Preprocess only. Keep line control information and remove comments --preprocess
-E
Preprocess only. Remove line control information and comments --no_line_commands
-P
Keep comments in the preprocessed output --comments
-C
Do syntax checking only --no_code_gen
-n
Specify that a full compilation should be done (not just preprocessing) --no_preproc_only
Put out line control information in the form # nnn instead of #line nnn --old_line_commands
Forces pcc style preprocessing --old_style_preprocessing
Preprocess only. Emit dependencies for make --dependencies
-M
Preprocess only. Generate list of included files --trace_includes
-H
Define preprocessor macro --define_macro macro[(parm-list)] [=def]
-Dmacro [(parm-list)][=def]
Remove preprocessor macro --undefine_macro macro
-Umacro
Allow (or disallow) macros with a variable number of arguments --variadic_macros
--no_variadic_macros
Allow (or disallow) macros with a variable number of arguments and allow the naming of the list --extended_variadic_macros
--no_extended_variadic_macros
Language control options
Strict ANSI C++. Issue errors on non-ANSI features --strict
-A
Strict ANSI C++. Issue warnings on non-ANSI features --strict_warnings
-a
Select memory model: mixed, static or reentrant. Select default memory space: X, Y, L or P. Specify stack not in L memory (only for cp56) -M[m|s|r][x|y|l|p][L]
Select memory model: 24-bit, 16/24-bit or 16-bit or DSP566xx. Do not use hardware stack extension. Select default memory space: X, Y, L or P. Specify stack not in L memory (only for cp563) -M[24|1624|16|6] [n][x|y|l|p][L]
Compile C++ compatible with cfront version 2.1 --cfront_2.1
-b
Compile C++ compatible with cfront version 3.0 --cfront_3.0
Accept dollar signs in identifiers --dollar
-$
Treat all 'char' variables as signed --signed_chars
-s
Treat all 'char' variables as unsigned --unsigned_chars
-u
Enable or disable K&R arithmetic conversion rules for longs --long_preserving_rules
--no_long_preserving_rules
Make string literals const --const_string_literals
--no_const_string_literals
Enable or disable support for exception handling --exceptions
--no_exceptions
-x
Enable the diagnostics of noncompliance with the "Embedded C++" subset --embedded_c++
Enable or disable support for embedded C++ language extension keywords --embedded
--no_embedded
Enable or disable operator functions to overload builtin operators on enum-typed operands --enum_overloading
--no_enum_overloading
Enable or disable support for the explicit specifier on constructor declarations --explicit
--no_explicit
Enable or disable inline function with external C++ linkage --extern_inline
--no_extern_inline
Enable or disable implicit type conversion between external C and C++ function pointers --implicit_extern_c_type_
conversion
--no_implicit_extern_c_type_conversion
Suppress type info variables in generated C --suppress_typeinfo_vars
Suppress definition of virtual function tables --suppress_vtbl
Force definition of virtual function tables --force_vtbl
Enable or disable anachronisms --anachronisms
--no_anachronisms
Enable or disable the anachronism of accepting a copy assignment operator with a base class as a default for the derived class --base_assign_op_is_default
--no_base_assign_op_is_default
Enable or disable the anachronism of allowing a reference to nonconst to bind to a class rvalue of the right type --nonconst_ref_anachronism
--no_nonconst_ref_anachronism
Use (or do not use) a non-standard template argument deduction method --nonstd_qualifier_deduction
--no_nonstd_qualifier_deduction
Allow or disallow unqualified name in non-member using declaration --nonstd_using_decl
--no_nonstd_using_decl
Perform argument dependent lookup of unqualified function names --arg_dep_lookup
--no_arg_dep_lookup
Add class name to the scope of the class --class_name_injection
--no_class_name_injection
Control the visibility of friend declarations --friend_injection
--no_friend_injection
Early or late handling of tie-breakers in overload resolution --early_tiebreaker
--late_tiebreaker
Enable or disable support for array new and delete --array_new_and_delete
--no_array_new_and_delete
Enable or disable support for namespaces --namespaces
--no_namespaces
New-style for-scoping rules --new_for_init
Old-style for-scoping rules --old_for_init
Enable or disable implicit use of the std namespace when standard header files are included --using_std
--no_using_std
Enable or disable support for RTTI (run-time type information) --rtti
--no_rtti
Enable or disable recognition of bool --bool
--no_bool
Enable or disable recognition of typename --typename
--no_typename
Enable or disable implicit determination, from context, whether a template parameter dependent name is a type or nontype --implicit_typename
--no_implicit_typename
Enable or disable a special nonstandard weighting of the conversion to the integral operand of the [] operator in overload resolution. --special_subscript_cost
--no_special_subscript_cost
Enable or disable recognition of wchar_t as a keyword --wchar_t_keyword
--no_wchar_t_keyword
Select lifetime for temporaries --long_lifetime_temps
--short_lifetime_temps
Enable or disable recognition of alternative tokens --alternative_tokens
--no_alternative_tokens
Enable or disable minimal inlining of function calls --inlining
--no_inlining
Enable or disable the removal of unneeded entities from the generated intermediate C file --remove_unneeded_entities
--no_remove_unneeded_entities
Template instantiation options
Control instantiation of external template entities --instantiate mode
-t mode
Enable or disable automatic instantiation of templates --auto_instantiation
--no_auto_instantiation
-T
Create separate instantiation files --one_instantiation_per_object
Write instantiation files to dir --instantiation_dir dir
Enable or disable implicit inclusion of source files as a method of finding definitions of template entities to be instantiated --implicit_include
--no_implicit_include
-B
Maximum number of instantiations for a single template (default 64) --pending_instantiations n
Dis-allow or allow normal functions as template instantiation --distinct_template_signatures
--no_distinct_template_signatures
Enable or disable recognition of "guiding declarations" of template functions --guiding_decls
--no_guiding_decls
Enable or disable old-style template specialization --old_specializations
--no_old_specializations
Precompiled header options
Automatically use and/or create a precompiled header file --pch
Create a precompiled header file with the specified name --create_pch file
Use a precompiled header file of the specified name --use_pch file
Specify directory dir in which to search for and/or create a precompiled header file --pch_dir dir
Enable or disable the display of a message indicating that a precompiled header file was created or used in the current compilation --pch_messages
--no_pch_messages
Generate a message when a precompiled header file cannot be used --pch_verbose
Output file options
Specify name of preprocess or intermediate output file --output file
-o file
Specify name of generated C output file --gen_c_file_name file
Diagnostic options
Display invocation syntax -?
Display version header only --version
-V
-v
Generate compilation timing information --timing
-#
Send diagnostics to error list file --error_output efile
Generate raw list file lfile --list lfile
-L lfile
Generate cross-reference file xfile --xref xfile
-X xfile
Override normal error severity --diag_suppress tag[,tag]...
--diag_remark tag[,tag]...
--diag_warning tag[,tag]...
--diag_error tag[,tag]...
Display error number in diagnostic messages --display_error_number
Specify maximum number of errors --error_limit number
-enumber
Issue remarks --remarks
-r
Suppress all warning messages --no_warnings
-w
Suppress warnings on local automatic variables that are used before their values are set --no_use_before_set_warnings
-j
Enable or disable a shorter form of diagnostic output --brief_diagnostics
--no_brief_diagnostics
Enable or disable TASKING style diagnostic messages --tsw_diagnostics
--no_tsw_diagnostics
Enable or disable wrapping of diagnostic messages --wrap_diagnostics
--no_wrap_diagnostics
Enable or disable warning when old-style for-scoping is used --for_init_diff_warning
--no_for_init_diff_warning

Table 4-2: Compiler options (functional)

4.1.1 Detailed Description of the Compiler Options

Option letters are listed below. If the same option is used more than once, the first (most left) occurrence is used. The placement of command line options is of no importance except for the -I option. Some options also have a "no_" form. These options are described together.

-?

Option:

-?

Description:

Display an explanation of options at stdout.

Example:

cp563  -?

--alternative_tokens

Option:

--alternative_tokens
--no_alternative_tokens

Default:

--alternative_tokens

Description:

Enable or disable recognition of alternative tokens. This controls recognition of the digraph tokens in C++, and controls recognition of the operator keywords (e.g., not, and, bitand, etc.).

Example:

To disable operator keywords (e.g., "not", "and") and digraphs, enter:

--anachronisms

Option:

--anachronisms
--no_anachronisms

Default:

--no_anachronisms

Description:

Enable or disable anachronisms.

Example:

cp563  --anachronisms test.cc

--nonconst_ref_anachronisms,
--cfront_2.1 / -b / --cfront_3.0
Section Anachronisms Accepted in chapter Language Implementation.

--arg_dep_lookup

Option:

--arg_dep_lookup
--no_arg_dep_lookup

Default:

--arg_dep_lookup

Description:

Controls whether argument dependent lookup of unqualified function names is performed.

Example:

cp563  --no_arg_dep_lookup test.cc

--array_new_and_delete

Option:

--array_new_and_delete
--no_array_new_and_delete

Default:

--array_new_and_delete

Description:

Enable or disable support for array new and delete.

Example:

cp563  --no_array_new_and_delete test.cc

--auto_instantiation / -T

Option:

-T / --auto_instantiation
--no_auto_instantiation

Default:

--auto_instantiation

Description:

-T is equivalent to --auto_instantiation. Enable or disable automatic instantiation of templates.

Example:

cp563  --no_auto_instantiation test.cc

--instantiate / -t
Section Template Instantiation in chapter Language Implementation.

--base_assign_op_is_default

Option:

--base_assign_op_is_default
--no_base_assign_op_is_default

Default:

--base_assign_op_is_default (in cfront compatibility mode)

Description:

Enable or disable the anachronism of accepting a copy assignment operator that has an input parameter that is a reference to a base class as a default copy assignment operator for the derived class.

Example:

cp563  --base_assign_op_is_default test.cc

--bool

Option:

--bool
--no_bool

Default:

--bool

Description:

Enable or disable recognition of the bool keyword.

Example:

cp563  --no_bool test.cc

--brief_diagnostics

Option:

--brief_diagnostics
--no_brief_diagnostics

Default:

--brief_diagnostics

Description:

Enable or disable a mode in which a shorter form of the diagnostic output is used. When enabled, the original source line is not displayed and the error message text is not wrapped when too long to fit on a single line.

Example:

cp563  --no_brief_diagnostics test.cc

--wrap_diagnostics
Chapter Compiler Diagnostics and Appendix Error Messages.

--cfront_version / -b

Option:

-b / --cfront_2.1
--cfront_3.0

Default:

Normal C++ mode.

Description:

-b is equivalent to --cfront_2.1. -- cfront_2.1 or --cfront_3.0 enable compilation of C++ with compatibility with cfront version 2.1 or 3.0 respectively. This causes the compiler to accept language constructs that, while not part of the C++ language definition, are accepted by the AT&T C++ Language System (cfront) release 2.1 or 3.0 respectively. These options also enable acceptance of anachronisms.

Example:

To compile C++ compatible with cfront version 3.0, enter:

--anachronisms
Section Extensions Accepted in Cfront 2.1 and 3.0 Compatibility Mode in chapter Language Implementation.

--class_name_injection

Option:

--class_name_injection
--no_class_name_injection

Default:

--class_name_injection

Description:

Controls whether the name of a class is injected into the scope of the class (as required by the standard) or is not injected (as was true in earlier versions of the C++ language).

Example:

cp563  --no_class_name_injection test.cc

--comments / -C

Option:

-C
--comments

Description:

Keep comments in the preprocessed output. This should be specified after either --preprocess or --no_line_commands; it does not of itself request preprocessing output.

Example:

To do preprocessing only, with comments and with line control information, enter:

--preprocess / -E, --no_line_commands / -P

--const_string_literals

Option:

--const_string_literals
--no_const_string_literals

Default:

--const_string_literals

Description:

Control whether C++ string literals and wide string literals are const (as required by the standard) or non-const (as was true in earlier versions of the C++ language).

Example:

cp563  --no_const_string_literals test.cc

--create_pch

Option:

--create_pch filename

Arguments:

A filename specifying the precompiled header file to create.

Description:

If other conditions are satisfied (see the Precompiled Headers section), create a precompiled header file with the specified name. If --pch (automatic PCH mode) or --use_pch appears on the command line following this option, its effect is erased.

Example:

To create a precompiled header file with the name test.pch, enter:

--pch, --use_pch
Section Precompiled Headers in chapter Language Implementation.

--define_macro / -D

Option:

-Dmacro [(parm-list)][= def]
--define_macro macro [(parm-list)][=def]

Arguments:

The macro you want to define and optionally its definition.

Description:

Define macro to the preprocessor, as in #define. If def is not given ('=' is absent), '1' is assumed. Function-style macros can be defined by appending a macro parameter list to name. Any number of symbols can be defined. The definition can be tested by the preprocessor with #if, #ifdef and #ifndef, for conditional compilations.

Example:

cp563  -DNORAM -DPI=3.1416 test.cc

--undefine_macro / -U

--dependencies / -M

Option:

-M
--dependencies

Description:

Do preprocessing only. Instead of the normal preprocessing output, generate on the preprocessing output file a list of dependency lines suitable for input to a 'make' utility.

When implicit inclusion of templates is enabled, the output may indicate false (but safe) dependencies unless --no_proproc_only is also used.

When you use the control program you have to use the -Em option instead, to obtain the same result.

Examples:

cp563  -M test.cc
test.ic: test.cc

--preprocess / -E, --no_line_commands / -P

--diag_option

Option:

--diag_suppress tag[,tag]...
--diag_remark tag[,tag]...
--diag_warning tag[,tag]...
--diag_error tag[,tag]...

Arguments:

A mnemonic error tag or an error number.

Description:

Override the normal error severity of the specified diagnostic messages. The message(s) may be specified using a mnemonic error tag or using an error number. The error tag names and error numbers are listed in the Error Messages appendix.

Example:

When you want diagnostic error 20 to be a warning, enter:

Chapter Compiler Diagnostics and Appendix Error Messages.

--display_error_number

Option:

--display_error_number

Description:

Display the error message number in any diagnostic messages that are generated. The option may be used to determine the error number to be used when overriding the severity of a diagnostic message. The error numbers are listed in the Error Messages appendix.

Normally, diagnostics are written to stderr in the following form:

With --display_error_number this form will be:

or:

If the severity may be overridden, the error number will include the suffix -D (for discretionary); otherwise no suffix will be present.

Example:

cp563  --display_error_number test.cc
"test.cc", line 7: error #64-D: declaration does not 
        declare anything
  struct ;
  ^

Chapter Compiler Diagnostics and Appendix Error Messages.

--distinct_template_signatures

Option:

--distinct_template_signatures
--no_distinct_template_signatures

Default:

--distinct_template_signatures

Description:

Control whether the signatures for template functions can match those for non-template functions when the functions appear in different compilation units. The default is --distinct_template_signatures, under which a normal function cannot be used to satisfy the need for a template instance; e.g., a function "void f(int)" could not be used to satisfy the need for an instantiation of a template "void f(T)" with T set to int. --no_distinct_template_signatures provides the older language behavior, under which a non-template function can match a template function. Also controls whether function templates may have template parameters that are not used in the function signature of the function template

Example:

cp563  --no_distinct_template_signatures test.cc

--dollar / -$

Option:

-$
--dollar

Default:

No dollar signs are allowed in identifiers.

Description:

Accept dollar signs in identifiers. Names like A$VAR are allowed.

Example:

cp563  -$ test.cc

--early_tiebreaker / --late_tiebreaker

Option:

--early_tiebreaker
--late_tiebreaker

Default:

--early_tiebreaker

Description:

Select the way that tie-breakers (e.g., cv-qualifier differences) apply in overload resolution. In "early" tie-breaker processing, the tie-breakers are considered at the same time as other measures of the goodness of the match of an argument value and the corresponding parameter type (this is the standard approach). In "late" tie-breaker processing, tie-breakers are ignored during the initial comparison, and considered only if two functions are otherwise equally good on all arguments; the tie-breakers can then be used to choose one function over another.

Example:

cp563  --late_tiebreaker test.cc

--embedded

Option:

--embedded
--no_embedded

Default:

--embedded

Description:

Enable or disable support for embedded C++ language extension keywords.

Example:

To disable embedded C++ language extension keywords, enter:

--embedded_c++

Option:

--embedded_c++

Description:

Enable the diagnostics of noncompliance with the "Embedded C++" subset (from which templates, exceptions, namespaces, new-style casts, RTTI, multiple inheritance, virtual base classes, and mutable are excluded.

Example:

To enable the diagnostics of noncompliance with the "Embedded C++" subset, enter:

--enum_overloading

Option:

--enum_overloading
--no_enum_overloading

Default:

--enum_overloading

Description:

Enable or disable support for using operator functions to overload builtin operations on enum-typed operands.

Example:

To disable overloading builtin operations on enum-typed operands, enter:

--error_limit / -e

Option:

-enumber
--error_limit number

Arguments:

An error limit number.

Default:

--error_limit 100

Description:

Set the error limit to number. The C++ compiler will abandon compilation after this number of errors (remarks and warnings are not counted toward the limit). By default, the limit is 100.

Example:

When you want compilation to stop when 10 errors occurred, enter:

--error_output

Option:

--error_output efile

Arguments:

The name for an error output file.

Description:

Redirect the output that would normally go to stderr (that is, diagnostic messages) to the file efile. This option is useful on systems where output redirection of files is not well supported. If used, this option should probably be specified first in the command line, since otherwise any command-line errors for options preceding the --error_output would be written to stderr before redirection.

Example:

To write errors to the file test.err instead of stderr, enter:

--exceptions / -x

Option:

-x / --exceptions
--no_exceptions

Default:

--no_exceptions

Description:

Enable or disable support for exception handling. -x is equivalent to --exceptions.

Example:

cp563  --exceptions test.cc

--explicit

Option:

--explicit
--no_explicit

Default:

--explicit

Description:

Enable or disable support for the explicit specifier on constructor declarations.

Example:

To disable support for the explicit specifier on constructor declarations, enter:

--extended_variadic_macros

Option:

--extended_variadic_macros
--no_extended_variadic_macros

Default:

--no_extended_variadic_macros

Description:

Allow or disallow macros with a variable number of arguments (implies --variadic_macros) and alow or disallow the naming of the variable argument list.

Example:

cp563  --extended_variadic_macros test.cc

--variadic_macros

--extern_inline

Option:

--extern_inline
--no_extern_inline

Default:

--extern_inline

Description:

Enable or disable support for inline functions with external linkage in C++. When inline functions are allowed to have external linkage (as required by the standard), then extern and inline are compatible specifiers on a non-member function declaration; the default linkage when inline appears alone is external (that is, inline means extern inline on non-member functions); and an inline member function takes on the linkage of its class (which is usually external). However, when inline functions have only internal linkage (as specified in the ARM), then extern and inline are incompatible; the default linkage when inline appears alone is internal (that is, inline means static inline on non-member functions); and inline member functions have internal linkage no matter what the linkage of their class.

Example:

cp563  --no_extern_inline test.cc

--for_init_diff_warning

Option:

--for_init_diff_warning
--no_for_init_diff_warning

Default:

--for_init_diff_warning

Description:

Enable or disable a warning that is issued when programs compiled under the new for-init scoping rules would have had different behavior under the old rules. The diagnostic is only put out when the new rules are used.

Example:

cp563  --no_for_init_diff_warning test.cc

--new_for_init / --old_for_init

--force_vtbl

Option:

--force_vtbl

Description:

Force definition of virtual function tables in cases where the heuristic used by the C++ compiler to decide on definition of virtual function tables provides no guidance. See --suppress_vtbl.

Example:

cp563  --force_vtbl test.cc

--suppress_vtbl

--friend_injection

Option:

--friend_injection
--no_friend_injection

Default:

--no_friend_injection

Description:

Controls whether the name of a class or function that is declared only in friend declarations is visible when using the normal lookup mechanisms. When friend names are injected, they are visible to such lookups. When friend names are not injected (as required by the standard), function names are visible only when using argument-dependent lookup, and class names are never visible.

Example:

cp563  --friend_injection test.cc

--arg_dep_lookup

--gen_c_file_name

Option:

--gen_c_file_name file

Arguments:

An output filename.

Default:

Module name with .ic suffix.

Description:

This option specifies the file name to be used for the generated C output.

Example:

To specify the file out.ic as the output file instead of test.ic, enter:

--guiding_decls

Option:

--guiding_decls
--no_guiding_decls

Default:

--guiding_decls

Description:

Enable or disable recognition of "guiding declarations" of template functions. A guiding declaration is a function declaration that matches an instance of a function template but has no explicit definition (since its definition derives from the function template). For example:

When regarded as a guiding declaration, f(int) is an instance of the template; otherwise, it is an independent function for which a definition must be supplied. If --no_guiding_decls is combined with --old_specializations, a specialization of a non-member template function is not recognized -- it is treated as a definition of an independent function.

Example:

cp563  --no_guiding_decls test.cc

--old_specializations

--implicit_extern_c_type_conversion

Option:

--implicit_extern_c_type_conversion
--no_implicit_extern_c_type_conversion

Default:

--implicit_extern_c_type_conversion

Description:

Enable or disable an extension to permit implicit type conversion in C++ between a pointer to an extern "C" function and a pointer to an extern "C++" function. This extension is allowed in environments where C and C++ functions share the same calling conventions.

Example:

cp563  --no_implicit_extern_c_type_conversion test.cc

--implicit_include / -B

Option:

-B / --implicit_include
--no_implicit_include

Default:

--no_implicit_include

Description:

Enable or disable implicit inclusion of source files as a method of finding definitions of template entities to be instantiated. -B is equivalent to --implicit_include.

Example:

cp563  --implicit_include test.cc

--instantiate / -t
Section Template Instantiation in chapter Language Implementation.

--implicit_typename

Option:

--implicit_typename
--no_implicit_typename

Default:

--implicit_typename

Description:

Enable or disable implicit determination, from context, whether a template parameter dependent name is a type or nontype.

Example:

cp563  --no_implicit_typename test.cc

--typename

--incl_suffixes

Option:

--include_suffixes suffixes

Arguments:

A colon-separated list of suffixes (e.g., "h:hpp::").

Description:

Specifies the list of suffixes to be used when searching for an include file whose name was specified without a suffix. If a null suffix is to be allowed, it must be included in the suffix list.

The default suffix list is no extension, .h and .hpp.

Example:

To allow only the suffixes .h and .hpp as include file extensions, enter:

Section 4.2 , Include Files.

--include_directory / -I

Option:

-Idirectory
--include_directory directory

Arguments:

The name of the directory to search for include file(s).

Description:

Change the algorithm for searching #include files whose names do not have an absolute pathname to look in directory.

Example:

cp563  -I/proj/include test.cc

Section 4.2 , Include Files.
--sys_include

--inlining

Option:

--inlining
--no_inlining

Default:

--inlining

Description:

Enable or disable minimal inlining of function calls.

Example:

To disable function call inlining, enter:

--instantiate / -t

Option:

-tmode
--instantiate mode

Pragma:

instantiate mode

Arguments:

The instantiation mode, which can be one of:

Default:

-tnone

Description:

Control instantiation of external template entities. External template entities are external (that is, noninline and nonstatic) template functions and template static data members. The instantiation mode determines the template entities for which code should be generated based on the template definition:

none Instantiate no template entities. This is the default.

used Instantiate only the template entities that are used in this compilation.

all Instantiate all template entities whether or not they are used.

local Instantiate only the template entities that are used in this compilation, and force those entities to be local to this compilation.

Example:

To specify to instantiate only the template entities that are used in this compilation, enter:

--auto_instantiation / -T
Section Template Instantiation in chapter Language Implementation.

--instantiation_dir

Option:

--instantiation_dir directory

Arguments:

The name of the directory to write instantiation files to.

Description:

You can use this option in combination with option --one_instantiation_per_object to specify a directory into which the generated object files should be put.

Example:

To create separate instantiation files in directory /proj/template, enter:

Section Template Instantiation in chapter Language Implementation.
--one_instantiation_per_object

--list / -L

Option:

-Llfile
--list lfile

Arguments:

The name of the list file.

Description:

Generate raw listing information in the file lfile. This information is likely to be used to generate a formatted listing. The raw listing file contains raw source lines, information on transitions into and out of include files, and diagnostics generated by the C++ compiler. Each line of the listing file begins with a key character that identifies the type of line, as follows:

N: a normal line of source; the rest of the line is the text of the line.

X: the expanded form of a normal line of source; the rest of the line is the text of the line. This line appears following the N line, and only if the line contains non-trivial modifications (comments are considered trivial modifications; macro expansions, line splices, and trigraphs are considered non-trivial modifications).

S: a line of source skipped by an #if or the like; the rest of the line is text. Note that the #else, #elif, or #endif that ends a skip is marked with an N.

L: an indication of a change in source position. The line has a format similar to the # line-identifying directive output by cpp, that is to say

R, W, E, or C:  an indication of a diagnostic (R for remark, W for warning, E for error, and C for catastrophic error). The line has the form

Example:

To write raw listing information to the file test.lst, enter:

--long_lifetime_temps / --short_lifetime_temps

Option:

--long_lifetime_temps
--short_lifetime_temps

Default:

--long_lifetime_temps (cfront)
--short_lifetime_temps (standard C++)

Description:

Select the lifetime for temporaries: short means to end of full expression; long means to the earliest of end of scope, end of switch clause, or the next label. Short is standard C++, and long is what cfront uses (the cfront compatibility modes select long by default).

Example:

cp563  --long_lifetime_temps test.cc

--long_preserving_rules

Option:

--long_preserving_rules
--no_long_preserving_rules

Default:

--no_long_preserving_rules

Description:

Enable or disable the K&R usual arithmetic conversion rules with respect to long. This means the rules of K&R I, Appendix A, 6.6. The significant difference is in the handling of "long op unsigned int" when int and long are the same size. The ANSI/ISO rules say the result is unsigned long, but K&R I says the result is long (unsigned long did not exist in K&R I).

The default is the ANSI/ISO rule.

Example:

cp563  --long_preserving_rules test.cc

-Mmodel

Option:

-M[model][n][mem][L] (at least one argument must be specified)

Arguments:

The memory model to be used, where model is one of:

and mem is one of:

other arguments:

Default:

-Mmx for cp56
-M24x for cp563

Description:

Select memory model and default memory space to be used. With -Mn (cp563 only) the compiler selects pushing and popping the return address on the user stack (DSP563xx only). To circumvent hardware stack extension silicon problems on the DSP563xx, the compiler can avoid using the hardware stack for function calls by saving the return address on the user stack.

The use of default P data memory (-Mp ) is not recommended because it leads to much more object code. It is meant for applications with special hardware layouts only.

Example:

cp56 -Mr test.cc
cp563 -M16 test.cc

--namespaces

Option:

--namespaces
--no_namespaces

Default:

--namespaces

Description:

Enable or disable support for namespaces.

Example:

cp563  --no_namespaces test.cc

--using_std
Section Namespace Support in chapter Language Implementation.

--new_for_init / --old_for_init

Option:

--new_for_init
--old_for_init

Default:

--new_for_init

Description:

Control the scope of a declaration in a for-init-statement. The old (cfront-compatible) scoping rules mean the declaration is in the scope to which the for statement itself belongs; the new (standard-conforming) rules in effect wrap the entire for statement in its own implicitly generated scope.

Example:

cp563  --old_for_init test.cc

--no_code_gen / -n

Option:

-n
--no_code_gen

Description:

Do syntax-checking only. Do not generate a C file.

Example:

cp563  --no_code_gen test.cc

--no_line_commands / -P

Option:

-P
--no_line_commands

Description:

Do preprocessing only. Write preprocessed text to the preprocessing output file, with comments removed and without line control information. When you use the -P option, use the -o option to separate the output from the header produced by the compiler.

Examples:

cp563  -P -o preout test.cc

--comments / -C, --preprocess / -E, --dependencies / -M

--nonconst_ref_anachronism

Option:

--nonconst_ref_anachronism
--no_nonconst_ref_anachronism

Default:

--nonconst_ref_anachronism

Description:

Enable or disable the anachronism of allowing a reference to nonconst to bind to a class rvalue of the right type. This anachronism is also enabled by the --anachronisms option and the cfront-compatibility options.

Example:

cp563  --no_nonconst_ref_anachronism test.cc

--anachronisms, --cfront_2.1 / -b / --cfront_3.0
Section Anachronisms Accepted in chapter Language Implementation.

--nonstd_qualifier_deduction

Option:

--nonstd_qualifier_deduction
--no_nonstd_qualifier_deduction

Default:

--no_nonstd_qualifier_deduction

Description:

Controls whether nonstandard template argument deduction should be performed in the qualifier portion of a qualified name. With this feature enabled, a template argument for the template parameter T can be deduced in contexts like A<T>::B or T::B. The standard deduction mechanism treats these as nondeduced contexts that use the values of template parameters that were either explicitly specified or deduced elsewhere.

Example:

cp563  --nonstd_qualifier_deduction test.cc

--nonstd_using_decl

Option:

--nonstd_using_decl
--no_nonstd_using_decl

Default:

--no_nonstd_using_decl

Description:

Controls whether a non-member using declaration that specifies an unqualified name is allowed.

Example:

cp563  --nonstd_using_decl test.cc

--no_preproc_only

Option:

--no_proproc_only

Description:

May be used in conjunction with the options that normally cause the C++ compiler to do preprocessing only (e.g., --preprocess, etc.) to specify that a full compilation should be done (not just preprocessing). When used with the implicit inclusion option, this makes it possible to generate a preprocessed output file that includes any implicitly included files.

Examples:

cp563  -E -B --no_preproc_only test.cc

--preprocess / -E,
--implicit_include / -B, --no_line_commands / -P

--no_use_before_set_warnings / -j

Option:

-j
--no_use_before_set_warnings

Description:

Suppress warnings on local automatic variables that are used before their values are set.

Example:

cp563  -j test.cc

--no_warnings / -w

--no_warnings / -w

Option:

-w
--no_warnings

Description:

Suppress all warning messages. Error messages are still issued.

Example:

To suppress all warnings, enter:

--old_line_commands

Option:

--old_line_commands

Description:

When generating source output, put out #line directives in the form used by the Reiser cpp, that is, # nnn instead of #line  nnn.

Example:

To do preprocessing only, without comments and with old style line control information, enter:

--preprocess / -E, --no_line_commands / -P

--old_specializations

Option:

--old_specializations
--no_old_specializations

Default:

--old_specializations

Description:

Enable or disable acceptance of old-style template specializations (that is, specializations that do not use the template<> syntax).

Example:

cp563  --no_old_specializations test.cc

--old_style_preprocessing

Option:

--old_style_preprocessing

Description:

Forces pcc style preprocessing when compiling. This may be used when compiling an ANSI C++ program on a system in which the system header files require pcc style preprocessing.

Example:

To force pcc style preprocessing, enter:

--preprocess / -E, --no_line_commands / -P

--one_instantiation_per_object

Option:

--one_instantiation_per_object

Description:

Put out each template instantiation in this compilation (function or static data member) in a separate object file. The primary object file contains everything else in the compilation, that is, everything that is not an instantiation. Having each instantiation in a separate object file is very useful when creating libraries, because it allows the user of the library to pull in only the instantiations that are needed. That can be essential if two different libraries include some of the same instantiations.

Example:

To create separate instantiation files, enter:

Section Template Instantiation in chapter Language Implementation.

--output / -o

Option:

-o file
--output file

Arguments:

An output filename specifying the preprocessing or intermediate language output file.

Default:

No intermediate output file is generated.

Description:

Use file as output filename for the preprocessing or intermediate language output file.

Example:

To use the file my.pre as the preprocessing output file, enter:

--preprocess / -E, --no_line_commands / -P

--pch

Option:

--pch

Description:

Automatically use and/or create a precompiled header file. For details, see the Precompiled Headers section in chapter Language Implementation. If --use_pch or --create_pch (manual PCH mode) appears on the command line following this option, its effect is erased.

Example:

cp563  --pch test.cc

--use_pch, --create_pch
Section Precompiled Headers in chapter Language Implementation.

--pch_dir

Option:

--pch_dir dir_name

Arguments:

The name of the directory to search for and/or create a precompiled header file.

Description:

Specify the directory in which to search for and/or create a precompiled header file. This option may be used with automatic PCH mode (--pch) or manual PCH mode (--create_pch or --use_pch).

Example:

To use the directory /usr/include/pch to automatically create precompiled header files, enter:

--pch, --use_pch, --create_pch
Section Precompiled Headers in chapter Language Implementation.

--pch_messages

Option:

--pch_messages
--no_pch_messages

Default:

--pch_messages

Description:

Enable or disable the display of a message indicating that a precompiled header file was created or used in the current compilation.

Example:

cp563  --create_pch test.pch --pch_messages test.cc
"test.cc": creating precompiled header file "test.pch"

--pch, --use_pch, --create_pch
Section Precompiled Headers in chapter Language Implementation.

--pch_verbose

Option:

--pch_verbose

Description:

In automatic PCH mode, for each precompiled header file that cannot be used for the current compilation, a message is displayed giving the reason that the file cannot be used.

Example:

cp563  --pch --pch_verbose test.cc

--pch
Section Precompiled Headers in chapter Language Implementation.

--pending_instantiations

Option:

--pending_instantiations n

Arguments:

The maximum number of instantiation for a single template.

Default:

64

Description:

Specifies the maximum number of instantiations of a given template that may be in process of being instantiated at a given time. This is used to detect runaway recursive instantiations. If n is zero, there is no limit.

Example:

To specify a maximum of 32 pending instantiations, enter:

Section Template Instantiation in chapter Language Implementation.

--preinclude

Option:

--preinclude filename

Arguments:

The name of file to include at the beginning of the compilation.

Description:

Include the source code of the indicated file at the beginning of the compilation. This can be used to establish standard macro definitions, etc.

The filename is searched for in the directories on the include search list.

Example:

cp563  --preinclude extra.h test.cc

Section 4.2 , Include Files.

--preprocess / -E

Option:

-E
--preprocess

Description:

Do preprocessing only. Write preprocessed text to the preprocessing output file, with comments removed and with line control information. When you use the -E option, use the -o option to separate the output from the header produced by the compiler.

Example:

cp563  -E -o preout test.cc

--comments / -C,
--dependencies / -M,
--no_line_commands / -P

--remarks / -r

Option:

-r
--remarks

Description:

Issue remarks, which are diagnostic messages even milder than warnings.

Example:

To enable the display of remarks, enter:

--remove_unneeded_entities

Option:

--remove_unneeded_entities
--no_remove_unneeded_entities

Default:

--remove_unneeded_entities

Description:

Enable or disable an optimization to remove unneeded entities from the generated intermediate C file. Something may be referenced but unneeded if it is referenced only by something that is itself unneeded; certain entities, such as global variables and routines defined in the translation unit, are always considered to be needed.

Example:

cp563  --no_remove_unneeded_entities test.cc

--rtti

Option:

--rtti
--no_rtti

Default:

--no_rtti

Description:

Enable or disable support for RTTI (run-time type information) features: dynamic_cast, typeid.

Example:

cp563  --rtti test.cc

--signed_chars / -s

Option:

-s
--signed_chars

Description:

Treat 'character' type variables as 'signed character' variables. When plain char is signed, the macro __SIGNED_CHARS__ is defined.

Example:

cp563  -s test.cc

--unsigned_chars / -u

--special_subscript_cost

Option:

--special_subscript_cost
--no_special_subscript_cost

Default:

--no_special_subscript_cost

Description:

Enable or disable a special nonstandard weighting of the conversion to the integral operand of the [] operator in overload resolution.

This is a compatibility feature that may be useful with some existing code. The special cost is enabled by default in cfront 3.0 mode. With this feature enabled, the following code compiles without error:

Example:

cp563  --special_subscript_cost test.cc

--strict / -A
--strict_warnings / -a

Option:

-A / --strict

-a / --strict_warnings

Description:

Enable strict ANSI mode, which provides diagnostic messages when non-ANSI features are used, and disables features that conflict with ANSI C or C++. ANSI violations can be issued as either warnings or errors depending on which command line option is used. The --strict options issue errors and the --strict_warnings options issue warnings. The error threshold is set so that the requested diagnostics will be listed.

Example:

To enable strict ANSI mode, with error diagnostic messages, enter:

--suppress_typeinfo_vars

Option:

--suppress_typeinfo_vars

Description:

Suppress the generation of type info variables when run-time type info (RTTI) is disabled. By default only type info variables are generated, no other run-time type info. With this option you can also suppress type info varables.

Example:

cp563  --suppress_typeinfo_vars test.cc

--rtti

--suppress_vtbl

Option:

--suppress_vtbl

Description:

Suppress definition of virtual function tables in cases where the heuristic used by the C++ compiler to decide on definition of virtual function tables provides no guidance. The virtual function table for a class is defined in a compilation if the compilation contains a definition of the first non-inline non-pure virtual function of the class. For classes that contain no such function, the default behavior is to define the virtual function table (but to define it as a local static entity). The --suppress_vtbl option suppresses the definition of the virtual function tables for such classes, and the --force_vtbl option forces the definition of the virtual function table for such classes. --force_vtbl differs from the default behavior in that it does not force the definition to be local.

Example:

cp563  --suppress_vtbl test.cc

--force_vtbl

--sys_include

Option:

--sys_include directory

Arguments:

The name of the system include directory to search for include file(s).

Description:

Change the algorithm for searching system include files whose names do not have an absolute pathname to look in directory.

Example:

cp563  --sys_include /proj/include test.cc

Section 4.2 , Include Files.
--include_directory

--timing / -#

Option:

-#
--timing

Default:

No timing information is generated.

Description:

Generate compilation timing information. This option causes the compiler to display the amount of CPU time and elapsed time used by each phase of the compilation and a total for the entire compilation.

Example:

cp563  -# test.cc
processed 180 lines at 8102 lines/min

--trace_includes / -H

Option:

-H
--trace_includes

Description:

Do preprocessing only. Instead of the normal preprocessing output, generate on the preprocessing output file a list of the names of files #included.

Examples:

cp563  -H test.cc
iostream.h
string.h

--preprocess / -E, --no_line_commands / -P

--tsw_diagnostics

Option:

--tsw_diagnostics
--no_tsw_diagnostics

Default:

--tsw_diagnostics

Description:

Enable or disable a mode in which the error message is given in the TASKING style. So, in the same format as the TASKING C compiler messages.

Example:

cp563  --no_tsw_diagnostics test.cc

--brief_diagnostics
Chapter Compiler Diagnostics and Appendix Error Messages.

--typename

Option:

--typename
--no_typename

Default:

--typename

Description:

Enable or disable recognition of the typename keyword.

Example:

cp563  --no_typename test.cc

--implicit_typename

--undefine_macro / -U

Option:

-Uname
--undefine_macro name

Arguments:

The name macro you want to undefine.

Description:

Remove any initial definition of identifier name as in #undef, unless it is a predefined ANSI standard macro. ANSI specifies the following predefined symbols to exist, which cannot be removed:

__FILE__ "current source filename"

__LINE__ current source line number (int type)

__TIME__ "hh:mm:ss"

__DATE__ "Mmm dd yyyy"

__STDC__ level of ANSI standard. This macro is set to 1 when the option to disable language extensions (-A) is effective. Whenever language extensions are excepted, __STDC__ is set to 0 (zero).

__cplusplus is defined when compiling a C++ program

When cp563 is invoked, also the following predefined symbols exist:

c_plusplus is defined in addition to the standard __cplusplus

__SIGNED_CHARS__
is defined when plain char is signed.

_WCHAR_T is defined when wchar_t is a keyword.

_BOOL is defined when bool is a keyword.

__ARRAY_OPERATORS
is defined when array new and delete are enabled.

These symbols can be turned off with the -U option.

Example:

cp563  -Uc_plusplus test.cc

-D / --define_macro

--unsigned_chars / -u

Option:

-u
--unsigned_chars

Description:

Treat 'character' type variables as 'unsigned character' variables.

Example:

cp563  -u test.cc

--signed_chars / -s

--use_pch

Option:

--use_pch filename

Arguments:

The filename to use as a precompiled header file.

Description:

Use a precompiled header file of the specified name as part of the current compilation. If --pch (automatic PCH mode) or --create_pch appears on the command line following this option, its effect is erased.

Example:

To use the precompiled header file with the name test.pch, enter:

--pch, --create_pch
Section Precompiled Headers in chapter Language Implementation.

--using_std

Option:

--using_std
--no_using_std

Default:

--using_std

Description:

Enable or disable implicit use of the std namespace when standard header files are included.

Example:

cp563  --using_std test.cc

--namespaces
Section Namespace Support in chapter Language Implementation.

--variadic_macros

Option:

--variadic_macros
--no_variadic_macros

Default:

--no_variadic_macros

Description:

Allow or disallow macros with a variable number of arguments.

Example:

cp563  --variadic_macros test.cc

--extended_variadic_macros

--version / -V / -v

Option:

-V
-v
--version

Description:

Display version information.

Example:

cp563 -V
TASKING DSP563xx/6xx C++ compiler   vx.yrz Build nnn
Copyright years Altium BV           Serial# 00000000

--wchar_t_keyword

Option:

--wchar_t_keyword
--no_wchar_t_keyword

Default:

--wchar_t_keyword

Description:

Enable or disable recognition of wchar_t as a keyword.

Example:

cp563  --no_wchar_t_keyword test.cc

--wrap_diagnostics

Option:

--wrap_diagnostics
--no_wrap_diagnostics

Default:

--wrap_diagnostics

Description:

Enable or disable a mode in which the error message text is not wrapped when too long to fit on a single line.

Example:

cp563  --no_wrap_diagnostics test.cc

--brief_diagnostics
Chapter Compiler Diagnostics and Appendix Error Messages.

--xref / -X

Option:

-Xxfile
--xref xfile

Arguments:

The name of the cross-reference file.

Description:

Generate cross-reference information in the file xfile. For each reference to an identifier in the source program, a line of the form

is written, where X is

D for definition;

d for declaration (that is, a declaration that is not a definition);

M for modification;

A for address taken;

U for used;

C for changed (but actually meaning used and modified in a single operation, such as an increment);

R for any other kind of reference, or

E for an error in which the kind of reference is indeterminate.

symbol-id is a unique decimal number for the symbol. The fields of the above line are separated by tab characters.

4.2 Include Files

You may specify include files in two ways: enclosed in <...> or enclosed in "...". When an #include directive is seen, the following algorithm is used to try to open the include file:

1. If the filename is enclosed in "...", and it is not an absolute pathname (does not begin with a '\' for PC, or a '/' for UNIX), the include file is searched for in the directory of the file containing the #include line. For example, in:

PC:

UNIX:

cp563 first searches in the directory ..\..\source (../../source for UNIX) for include files.

If you compile a source file in the directory where the file is located ( cp563 test.cc), the compiler searches for include files in the current directory.

This first step is not done for include files enclosed in <...>.

2. Use the directories specified with the -I or --include_directory option, in a left-to-right order. For example:

PC:

UNIX:

3. Check if the environment variable CP563INC exists. If it does exist, use the contents as a directory specifier for include files. You can specify more than one directory in the environment variable CP563INC by using a separator character. Instead of using -I as in the example above, you can specify the same directory using CP563INC (use CP56INC for the DSP5600x family):

PC:

UNIX:

4. When an include file is not found with the rules mentioned above, the compiler tries the subdirectories include.cpp and include, one directory higher than the directory containing the cp563 binary. For example:

PC:

UNIX:

The compiler determines run-time which directory the binary is executed from to find this include directory.

5. If the include file is still not found, the directories specified in the --sys_include option are searched.

A directory name specified with the -I option or in CP563INC may or may not be terminated with a directory separator, because cp563 inserts this separator, if omitted.

When you specify more than one directory to the environment variable CP563INC , you have to use one of the following separator characters:

PC:

UNIX:

If the include directory is specified as -, e.g., -I-, the option indicates the point in the list of -I or --include_directory options at which the search for file names enclosed in <...> should begin. That is, the search for <...> names should only consider directories named in -I or --include_directory options following the -I-, and the directories of items 3 and 4 above. -I- also removes the directory containing the current input file (item 1 above) from the search path for file names enclosed in "...".

An include directory specified with the --sys_include option is considered a "system" include directory. Warnings are suppressed when processing files found in system include directories.

If the filename has no suffix it will be searched for by appending each of a set of include file suffixes. When searching in a given directory all of the suffixes are tried in that directory before moving on to the next search directory. The default set of suffixes is, no extension, .h and .hpp. The default can be overridden using the --incl_suffixes command line option. A null file suffix cannot be used unless it is present in the suffix list (that is, the C++ compiler will always attempt to add a suffix from the suffix list when the filename has no suffix).

4.3 Pragmas

According to ANSI (3.8.6) a preprocessing directive of the form:

causes the compiler to behave in an implementation-defined manner. The compiler ignores pragmas which are not mentioned in the list below. Pragmas give directions to the code generator of the compiler. Besides the pragmas there are two other possibilities to steer the code generator: command line options and keywords. The compiler acknowledges these three groups using the following rule:

Command line options can be overruled by keywords and pragmas. Keywords can be overruled by pragmas. So the pragma has the highest priority.

This approach makes it possible to set a default optimization level for a source module, which can be overridden temporarily within the source by a pragma.

cp563 supports the following pragmas and all pragmas that are described in the C Cross-Compiler User's Guide:

instantiate
do_not_instantiate

can_instantiate
These are template instantiation pragmas. They are described in detail in the section Template Instantiation in chapter Language Implementation.

hdrstop

no_pch These are precompiled header pragmas. They are described in detail in the section Precompiled Headers in chapter Language Implementation.

once When placed at the beginning of a header file, indicates that the file is written in such a way that including it several times has the same effect as including it once. Thus, if the C++ compiler sees #pragma once at the start of a header file, it will skip over it if the file is #included again.

ident This pragma is given in the form:

4.4 Compiler Limits

The ANSI C standard [1-2.2.4] defines a number of translation limits, which a C compiler must support to conform to the standard. The standard states that a compiler implementation should be able to translate and execute a program that contains at least one instance of every one of the limits listed below. The C compiler's actual limits are given within parentheses.

Most of the actual compiler limits are determined by the amount of free memory in the host system. In this case a 'D' (Dynamic) is given between parentheses. Some limits are determined by the size of the internal compiler parser stack. These limits are marked with a 'P'. Although the size of this stack is 200, the actual limit can be lower and depends on the structure of the translated program.


Copyright © 2002 Altium BV