JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
CodeSonar provides models for the Wind River C and C++ compiler drivers.
| Compiler model |
Source file extensions | Native driver | Description |
|---|---|---|---|
| dcc | .c, .cpp, .cxx, .cc, .C | dcc | Wind River C/C++ compiler driver that assumes C libraries. Model is based on diab5.0ppc. |
| dplus | Wind River C/C++ compiler driver that assumes C++ libraries. Model is based on diab5.0ppc. | ||
| ccppc | .c, .C, .cc, .cpp, .cxx, .ii | ccppc | Wind River version of GNU C compiler. Not recognized by default, because the name conflicts with the Green Hills compiler. Model is based on gcc model. |
| c++ppc | .c, .C, .cc, .cpp, .cxx, .ii | c++ppc | Wind River version of GNU C compiler. Not recognized by default, for consistency with ccppc. Model is based on gpp model. |
The Wind River models are available on all platforms.
For availability information, see the individual sections below.
Wind River dcc and dplus are compiler drivers: they parse command lines and decide which compiler, assembler, and linker to invoke, and with what arguments. The CodeSonar dcc model bases the project build on these invocations.
| Platform Availability | The dcc compiler model is available for all platforms. | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Default Recognition/Handling | By default, compilations
are recognized and handled as follows.
|
|||||||||
| Specifying Additional Mappings | If your compiler executable has a different name, specify a corresponding COMPILER_MODELS rule to map your executable name to the dcc model. |
For full details of all native compilers recognized by CodeSonar by default, see section Compilers Recognized by CodeSonar.
The model-specific ABI key format for the dcc compiler model is:
as
If an ABI key with this format is specified for a compilation that is modeled with the dcc compiler model, the following settings will be applied.
The dcc compiler model provides specific handling for the following command line options. Other options are parsed but do not receive additional handling.
| Option | Additional Treatment in Model | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| -A- | Various conditionally-defined macros will not be defined if this is specified. | |||||||||||||||||||||
| -A pred(ident) -Apred(ident) |
Specifies front end option --cs_diab_assert pred(ident). | |||||||||||||||||||||
| -Dmacro -D macro |
Defines macro macro to 1. -D and -U options are evaluated in order of appearance | |||||||||||||||||||||
| -Dmacro=defn -D macro=defn |
Defines macro macro with defn as its definition. -D and -U options are evaluated in order of appearance | |||||||||||||||||||||
| -I@ |
Specifies front end options -I. and --cs_no_I_dot. | |||||||||||||||||||||
| -Idir -I dir |
Specifies front end option -Idir. | |||||||||||||||||||||
| -if1=f2 -i f1=f2 |
Specifies front end option --cs_diab_include_replace f1=f2. | |||||||||||||||||||||
| -ifname= -i fname = |
Specifies front end option --cs_diab_include_replace fname=. | |||||||||||||||||||||
| -i=fname -i =fname |
Specifies front end option --preinclude fname. | |||||||||||||||||||||
| -Umacro -U macro |
Undefines macro macro. -D and -U options are evaluated in order of appearance | |||||||||||||||||||||
| -w | Specifies front end option -w. | |||||||||||||||||||||
| -X12 -X12=n -Xbit-fields-signed -Xbit-fields-unsigned -Xsigned-bitfields -Xunsigned-bitfields |
By default, the model treats bit fields as unsigned for C compilations. These arguments modify
this treatment as follows; later arguments take precedence over
earlier ones.
|
|||||||||||||||||||||
| -X119=4 -X119=44 -Xbool-is-char -Xbool-is-int |
By default, the model treats bool as if implemented as
plain char for C++ compilations. These arguments
modify the treatment as follows; later arguments take
precedence over earlier ones.
|
|||||||||||||||||||||
| -X213 -X213=n -Xbool-off -Xbool-on |
By default, the model treats bool as enabled for
C++ compilations. These
arguments modify the enabling status as follows; later
arguments take precedence over earlier ones.
|
|||||||||||||||||||||
| -Xc++-old -Xc++-old=n |
By default, the model will define macro __ETOA__=1 unless -A- is specified. If either of the
following are specified, it will not define this macro.
|
|||||||||||||||||||||
| -X23 -X23=n -Xchar-signed -Xchar-unsigned -Xsigned-char -Xunsigned-char |
By default, the model treats plain char as
unsigned. These arguments modify the treatment of plain
char as follows; later
arguments take precedence over earlier ones.
|
|||||||||||||||||||||
| -X7 -X7=n -X230 -X230=n -Xa -Xansi -Xc -Xdialect-ansi -Xdialect-c89 -Xdialect-c99 -Xdialect-k-and-r -Xdialect-pcc -Xdialect-strict-ansi -Xk-and-r -Xpcc -Xstrict-ansi -Xt |
Language mode
determines some of the macros and
front end options specified by the model. By default, the
model uses ANSI mode. These
arguments modify the language mode as follows; later arguments
take precedence over earlier ones. Note that option -Xc-mode also modifies
language mode.
|
|||||||||||||||||||||
| -X202 -X202=n -Xdigraphs-off -Xdigraphs-on -Xno-digraphs |
By default, the model treats digraphs as enabled for C++ compilations. These arguments
modify the enabling status as follows; later arguments take
precedence over earlier ones.
|
|||||||||||||||||||||
| -X67 -X67=n -Xdollar-in-ident |
By default, the model does not accept dollar signs in identifiers. These
options modify this treatment as follows; later arguments take
precedence over earlier ones.
|
|||||||||||||||||||||
| -X8 -X8=n -Xenum-is-best -Xenum-is-int -Xenum-is-short -Xenum-is-small -Xenum-is-unsigned |
By default, the model treats enum type as unspecified. These options modify the type as follows; later arguments take precedence over earlier ones.
|
|||||||||||||||||||||
| -X200 -X200=n -Xexception -Xexceptions -Xexceptions-off -Xno-exceptions |
By default, the model treats exception handling as enabled for C++ compilations. These arguments
modify the enabling status as follows; later arguments take
precedence over earlier ones.
|
|||||||||||||||||||||
| -X217 -X217=n -Xfor-init-scope-for -Xfor-init-scope-outer -Xold-scoping |
By default, the model uses "new" for scope rules for C++ compilations. These options modify
the enabling status as follows; later arguments take precedence
over earlier ones.
|
|||||||||||||||||||||
| -X207 -X207=n -Ximplicit-templates -Ximplicit-templates-off -Xno-implicit-template |
By default, the model treats templates as implicitly
instantiated for C++
compilations. These options modify this treatment as
follows; later arguments take precedence over earlier ones.
|
|||||||||||||||||||||
| -X75 -X75=n -Ximport |
By default, the model does not treat #include directives as #import directives. These options
modify the treatment as follows; later arguments take
precedence over earlier ones.
|
|||||||||||||||||||||
| -Xincfile-missing-ignore | Specifies front end option --cs_ignore_missing_include. | |||||||||||||||||||||
| -X219 -X219=n -Xnamespace-on -Xnamespace-off |
By default, the model recognizes namespace and using constructs in C++ compilations. These options modify
the enabling status as follows; later arguments take precedence
over earlier ones.
|
|||||||||||||||||||||
| -X205 -X205=n -Xno-rtti -Xrtti -Xrtti-off |
By default, the model treats RTTI
as enabled for C++
compilations. These options modify the enabling status as
follows; later arguments take precedence over earlier ones.
|
|||||||||||||||||||||
| -Xusing-std-on -Xusing-std-off |
By default, the model treats implicit use of the std namespace as enabled for C++ compilations. These arguments
modify the enabling status as follows; later arguments take
precedence over earlier ones.
|
|||||||||||||||||||||
| -Xvoid-ptr-arith-ok | C compilations only: model specifies front end option --cs_void_ptr_arith. | |||||||||||||||||||||
| -X214 -X214=n -Xwchar_t-on -Xwchar_t-off -Xno-wchar |
By default, the model treats the wchar_t keyword as enabled for C++ compilations. These arguments
modify the enabling status as follows; later arguments take
precedence over earlier ones.
|
|||||||||||||||||||||
| -Xc-mode -Xc-mode=1 |
Compilations are modeled in C mode, even if the designated C++ compiler is invoked. Language mode is set to C99. | |||||||||||||||||||||
| -X86=n -Xwchar=n |
Sets the corresponding
type for wchar_t as
specified by n. If these options are not specified, or are
specified with an empty argument, the default value is 4. The model specifies front end option --cs_targ_sizeof_wchar_t n exactly once per modeled compilation. Later arguments take precedence over earlier ones. |
|||||||||||||||||||||
| -X78=mask -Xkeywords=mask |
Sets the keyword
mask to mask. If these options are not specified,
or are specified with an empty argument, the default value is
0x0 The model specifies front end option --cs_diab_keywords mask exactly once per modeled compilation. Later arguments take precedence over earlier ones. |
If any of the following are specified, CodeSonar will ignore the compilation and will not generate any corresponding internal representation. If a CodeSonar project is based only on ignored compilations, it will have no contents and so will not be finalized.
The dcc model is applied to each compiler invocation from the compiler driver.
We use the following definitions.
| designated C compiler | If a model-specific ABI key is provided, the compiler specified in its first position. Otherwise, ctoa. |
|---|---|
| designated C++ compiler | If a model-specific ABI key is provided, the compiler specified in its second position. Otherwise, etoa. |
| designated assembler | If a model-specific ABI key is provided, the assembler specified in its third position. Otherwise, das. |
Then the modeled compilation mode for each invocation is determined as follows.
| Include Directories |
The model always specifies the following include directories.
base_include_dir is compdir/../../include where
compdir is the native compiler installation
directory.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Front End Options Always Specified |
The model always specifies the following front end options.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Front End Options Conditionally Specified |
The following front end options depend on modeled compilation mode and the specified command options. C compilations only
C++ compilations only
C and C++ compilations
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Macros Always Defined |
The following macros are defined for all uses of the
dcc compiler model.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Macros Conditionally Defined |
The following macros are only defined if option -A- is not specified. Additional constraints are noted below. C and C++ compilations
C++ compilations only
|
| Platform Availability | The ccppc and c++ppc compiler models are available for all platforms. |
|---|---|
| Default Recognition/Handling | The models are disabled by default on all platforms. |
| Specifying Mappings | CodeSonar does not recognize Wind River
ccppc or c++ppc compilations by default.
When you are building a project with one or both of these,
they must be explicitly enabled using the COMPILER_MODELS configuration file
parameter. Windows: COMPILER_MODELS += ccppc.exe -> ccppc COMPILER_MODELS += c++ppc.exe -> c++ppc Other systems: COMPILER_MODELS += ccppc -> ccppc COMPILER_MODELS += c++ppc -> c++ppc |
For full details of all native compilers recognized by CodeSonar by default, see section Compilers Recognized by CodeSonar.
The ccppc and c++ppc models accept the same command arguments and define the same macros and include paths as the GNU compiler models.
To report problems with this documentation, please visit https://support.codesecure.com/.