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 |
The cosmic compiler model models the behavior of the Cosmic Software C compilers.
The following file extensions are supported:
| Compiler model | Modeled native compilers | Source file extensions | Description |
|---|---|---|---|
| cosmic | Cosmic Software C compilers | any, including no extension | C source files. |
| Platform Availability | The cosmic compiler model is available for all platforms. | ||||||
|---|---|---|---|---|---|---|---|
| Default Recognition/Handling | By default, compilations
are recognized and handled as follows.
|
||||||
| Specifying Additional Mappings | There are no other default mappings due to executable name
conflicts. To use other Cosmic compilers on Windows, add the
following COMPILER_MODELS rules to your configuration
file.
If your Cosmic compiler executable has a different name, specify
a corresponding COMPILER_MODELS
rule to map your executable name to the cosmic
model.
COMPILER_MODELS += cpcorm0.exe -> cosmic COMPILER_MODELS += cpppc.exe -> cosmic COMPILER_MODELS += cpstm8.exe -> cosmic COMPILER_MODELS += cpst7.exe -> cosmic |
For full details of all native compilers recognized by CodeSonar by default, see section Compilers Recognized by CodeSonar.
The cosmic compiler model supports the following command arguments.
| Option | Additional Treatment in Model |
|---|---|
| -c99 | Specifies front end option --c99, unless there is a subsequent occurrence of -sa. Overrules any previous occurrences of -sa. |
| -dmacro -d macro |
Specifies front end option -Dmacro. |
| -dmacro=defn | Specifies front end option -Dmacro=defn. |
| -hfname -h fname |
Specifies front end option -preincludefname. |
| -idir -i dir |
Specifies front end option -Idir. |
| -sa | Specifies front end option --strict, unless there is a subsequent occurrence of -c99. Overrules any previous occurrences of -c99. |
| -u | Specifies front end option --unsigned_chars. |
| +sprec | Specifies front end options --cs_targ_sizeof_double 4, --cs_targ_sizeof_long_double 4,
--cs_targ_alignof_double 4, --cs_targ_alignof_long_double 4,
--cs_targ_double_field_alignment
4, --cs_targ_long_double_field_alignment
4. All other options with the '+' prefix are ignored. |
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 Cosmic model always specifies the following front end options.
The Cosmic compiler model always defines the following macros.
| _Bool | =short |
| __CSMC__ | =1 |
| far | =1 |
| _Fract | =int |
| near | =1 |
The model will specify a system include path as follows. If the path to the native compiler executable is /path/to/nativecompiler.exe, then the model will specify --sys_include /path/to/hdir, where hdir is the string obtained by replacing the first two characters of nativecompiler with H. (If nativecompiler has only one or two characters, hdir is Hstm8). For example, if the native compiler executable is cpcorm0.exe, hdir will be Hcorm0.
To report problems with this documentation, please visit https://support.codesecure.com/.