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 borland compiler model models the behavior of the Borland C++ compiler for Win32 and the Embarcadero C++ compiler for Win32.
The following file extensions are supported:
| Compiler model | Modeled native compilers | Source file extensions | Description |
|---|---|---|---|
| borland | Borland C++ compiler for Win32 and Embarcadero C++ compiler for Win32 | .c, .C | C source files. |
| .cc, .ccp, .ccx, .cp, .cpp, .cpx, .cx, .cxp, .cxx (case-insensitive) | C++ source files. |
| Platform Availability | The borland compiler model is available for Windows only. | ||||||
|---|---|---|---|---|---|---|---|
| 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 borland model. |
Embarcadero Notes
For full details of all native compilers recognized by CodeSonar by default, see section Compilers Recognized by CodeSonar.
The borland compiler model supports the following command arguments.
| Option | Additional Treatment in Model |
|---|---|
| @file | Extracts the options specified in file and appends them to the command line. |
| +file | Extracts the options specified in file and appends them to the command line. |
| -a- | Specifies front end option --pack_alignment=1. |
| -aval -a val |
If val is an integer such that 1≤val<8, specifies front end option --pack_alignment=val. Otherwise, no additional handling. |
| -A -Aval -A val |
If val is n, specifies front end option --c99. Otherwise, no additional handling. |
| -b | Any earlier occurrence of -b- will not incur the described additional handling. |
| -b- | Specifies front end option --short_enums. |
| -Dmlist -D mlist |
For each m in the semicolon-separated string mlist, specifies front end option -Dm. Each m may be a macro name or a macro=defn rule. |
| -Idlist -I dlist |
For each directory dir in the semicolon-separated string dlist, specifies front end option -Idir. |
| -K | Specifies front end option --unsigned_chars (in all other cases, specifies front end option --signed_chars). Supersedes any previous occurrence of -K-. |
| -K- | Any earlier occurrence of -K will not incur the described additional handling. |
| -P -Pext -P ext |
Sets compilation mode to C++
for both C and C++ source files (as identified by file
extension).
If ext is specified, only source files with (case-insensitive) extension .ext will be treated as C++. This is in addition to the default C++ extension list provided in the overview. If -Pext is specified multiple times, only the last ext value will be used. |
| -P- |
Supersedes the compilation mode effects of any previous
occurrence of -P
(with or without argument).
Note: does not affect changes to recognized C++ file extensions due to -Pext. |
| --replacehdr=fname --replacehdr fname |
Specifies front end option --cs_ext_header_map fname. |
| -RT | Specifies front end option --rtti. Supersedes any previous occurrence of -RT-. |
| -RT- | Specifies front end option --no_rtti. Supersedes any previous occurrence of -RT or --xrtti. |
| --sysinc=dir --sysinc dir |
Specifies front end option --sys_include dir. If --sysroot=s has been specified for some nonempty s, also specifies front end option --sys_include s/dir. |
| --sysroot=s --sysroot s |
Specifies an additional root directory to use in handling --sysinc arguments. |
| -tWM | Defines macro __MT__=1. |
| -Umlist -U mlist |
For each macro m in the semicolon-separated string mlist, specifies front end option -Um. |
| -VI- | Specifies front end option -I.. |
| --xrtti | Specifies front end option --rtti. Supersedes any previous occurrence of -RT-. |
The compilation mode controls some of the front end options specified by the model. Compilation mode depends on the modeled build command as follows.
| Source File Extension | Compilation Mode | ||||
|---|---|---|---|---|---|
| .c, .C |
|
||||
| .cc, .ccp, .ccx,
.cp, .cpp, .cpx,
.cx, .cxp, .cxx (case insensitive) |
C++ mode | ||||
| .ext where the modeled command line includes argument -Pext. The file extension is case insensitive. |
C++ mode | ||||
| otherwise | compilation not modeled |
The borland compiler model defines the following macros.
| Macros Always Defined | _M_IX86=300 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Macros Conditionally Defined |
|
||||||||||||||||
| Front End Options Always Specified | The borland model specifies --wchar_t_keyword when compilation mode is C++. | ||||||||||||||||
| Front End Options Conditionally Specified |
|
||||||||||||||||
| System Include Directories |
The model will specify system include directories with one or
more --sys_include D settings as
follows.
|
To report problems with this documentation, please visit https://support.codesecure.com/.