C++ Compiler Advanced
Go Up to C++ Compiler
Project > Options > C++ Compiler > Advanced
Use this dialog box to set C++ Compiler Advanced Compilation options.
Options | Description |
---|---|
Target, Apply, Save |
See Target Options. |
Common items |
Contents
Assembler Options
Assembler Options | Description | Compiler switches | ||||||
---|---|---|---|---|---|---|---|---|
bcc32 | bcc32c | bcc64 | bccosx | bcciosarm | bcciosarm64 | bccaarm | ||
Assembler options |
Enter any additional assembler options (such as Clang-enhanced compilers for 32-bit do not produce assembly files that can be assembled with TASM32. |
N/A | Platform not supported | Platform not supported | Platform not supported | Platform not supported | Platform not supported | |
Compile to .ASM, then assemble to .OBJ |
Causes the compiler to first generate an .ASM file from your C++ (or C) source code (same as the -S command-line option). The compiler then calls TASM32 (or the assembler specified in Specify which assembler to use) to create an .OBJ file from the .ASM file. The .ASM file is then deleted. Your program will fail to compile with the -B option if your C or C++ source code declares static global variables that are keywords in assembly. This is because the compiler does not precede static global variables with an underscore (as it does with other variables), and the assembly keywords will generate errors when the code is assembled. The default is False. |
Compile to .ASM |
N/A |
N/A |
N/A |
N/A |
N/A |
N/A |
Specify which assembler to use |
Assemble instructions using the specified filename as the assembler. The 32-bit Windows compiler uses TASM32 as the default assembler. The pop-up button is described in Common Items on Project Options Pages. |
-E |
Platform not supported |
Platform not supported |
N/A |
Platform not supported |
Platform not supported |
Platform not supported |
Floating Point Options
Floating point Options | Description | Compiler switches | ||||||
---|---|---|---|---|---|---|---|---|
bcc32 | bcc32c | bcc64 | bccosx | bcciosarm | bcciosarm64 | bccaarm | ||
Correct FDIV flaw |
Some early Pentium chips do not perform specific floating-point division calculations with full precision. Although chances of encountering this problem are slim, this switch inserts code that emulates floating-point division, so that you are assured of the correct result. This option decreases your program's FDIV instruction performance. Use of this option only corrects FDIV instructions in modules that you compile. The run-time library also contains FDIV instructions that are not modified by setting this switch. To correct the run-time libraries, you must recompile them using this switch. The following functions use FDIV instructions in assembly language that are not corrected if you use this option:
Also, this switch does not correct functions that convert a floating-point number to or from a string (such as printf or scanf). |
-fp |
Platform not supported |
Platform not supported |
-fp |
Platform not supported |
Platform not supported |
Platform not supported |
Fast floating point |
Floating-point operations are optimized without regard to explicit or implicit type conversions. Calculations can be faster than under ANSI operating mode. The purpose of the fast floating-point option is to allow certain optimizations that are technically contrary to correct C semantics. double x; x = (float) (3.5*x);
To execute this correctly, x is multiplied by 3.5 to give a double that is truncated to float precision, and then stores as a double in x. Under fast floating-point operation, the long double product is converted directly to a double. Since very few programs depend on the loss of precision on passing to a narrower floating-point type, fast floating point is on by default. When this option is disabled (-ff-) the compiler follows strict ANSI rules regarding floating-point conversions. |
-ff |
Platform not supported |
Platform not supported |
-ff |
Platform not supported |
Platform not supported |
Platform not supported |
Quiet floating point compares |
Use the quiet floating point instruction (FUCOMP). The default is True. |
-fq |
Platform not supported |
Platform not supported |
-fq |
Platform not supported |
Platform not supported |
Platform not supported |
Required math functions to indicate errors |
This option tells the compiler that programs can reliably test |
Platform not supported |
-fmath-errno |
-fmath-errno |
Platform not supported |
-fmath-errno |
-fmath-errno |
-fmath-errno |
Other Options
Other Options | Description | Compiler switches | ||||||
---|---|---|---|---|---|---|---|---|
bcc32 | bcc32c | bcc64 | bccosx | bcciosarm | bcciosarm64 | bccaarm | ||
Additional options to pass to the compiler |
Enter any additional compiler options that you want to add for the current project. |
|||||||
Code page |
Sets the default text character set that is used in the ANSI source code if the source code does not contain a BOM (byte order mark). Enables support for user-defined code pages. Its primary use is to tell the compiler how to parse and convert multibyte character strings (MBCS). In the entry field, you can specify either:
For example, if you specify either 65001 or UTF8 for the -CP option, the compiler supports UTF8 encoding for source code without BOM. There are two distinct areas where code pages come into effect:
Syntax Enable code paging with the following command-line switch:
In this syntax, nnnn is the numeric value of the code page you need to use for your specific locale.
The default is to not use a code page. |
-CP |
-finput-charset=0 |
N/A |
-CP |
N/A |
N/A |
N/A |
Execution Character Set |
Sets the Execution Character Set, which is used for ANSI strings in the executable file. The Execution Character Set option is designed for use with multi-device applications. If you compile an application with "932" as Execution Character Set, all string literals are compiled as "932" (Japanese SJIS) encoding regardless of whether the compile-time environment is "932". Wide-string literals (for example L"Test") are not affected by this option. In some instances, the value of the Code page option is used for the Execution Character Set option. The following matrix represents the relationship between the Code page and Execution Character Set options: |
-CE |
-fexec-charset=0 |
N/A |
-CE |
N/A |
N/A |
N/A |
Minimum contiguous memory allocation block size |
Specifies the minimum size used for contiguous memory allocation. The default is (no =nMB), which means to use the largest possible chunk. For example, you might want to set this option for compiling large projects that do not use PCH or for very large (perhaps machine generated) source files, ones that have many included source leading to many declarations per file. |
-savemem |
Platform not supported |
Platform not supported |
-savemem |
Platform not supported |
Platform not supported |
Platform not supported |
Unsigned char type |
The compiler treats char declarations as if they were of unsigned char type, which provides compatibility with other compilers. |
-K |
-funsigned-char |
N/A |
-K |
N/A |
N/A |
N/A |
Generate iOS universal binary file (armv7 + arm64) |
The compiler creates a universal binary file for both 32-bit and 64-bit iOS. |
Platform not supported |
Platform not supported |
Platform not supported |
Platform not supported |
Platform not supported |
Platform not supported |
Source Options
Source Options | Description | Compiler switches | ||||||
---|---|---|---|---|---|---|---|---|
bcc32 | bcc32c | bcc64 | bccosx | bcciosarm | bcciosarm64 | bccaarm | ||
Enable nested comments |
Nests comments in your C and C++ source files. Nested comments are not allowed in standard C implementations, and they are not portable.
|
-C |
Platform not supported |
Platform not supported |
-C |
Platform not supported |
Platform not supported |
Platform not supported |
Identifier length |
Specifies the number of significant characters (those that are recognized by the compiler) in an identifier. Except in C++, which recognizes identifiers of unlimited length, all identifiers are treated as distinct only if their significant characters are distinct. This includes variables, preprocessor macro names, and structure member names. Valid numbers for length are 0, and 8 through 250, where 0 means use the maximum identifier length of 250. By default, C++Builder uses 250 characters per identifier. Other systems (including some UNIX compilers) ignore characters beyond the first eight. If you are porting to other environments, you might want to compile your code with a smaller number of significant characters, which helps you locate name conflicts in long identifiers that have been truncated. The default is 250. |
-i |
Platform not supported |
Platform not supported |
-i |
Platform not supported |
Platform not supported |
Platform not supported |
String Options
String Options | Description | Compiler switches | ||||||
---|---|---|---|---|---|---|---|---|
bcc32 | bcc32c | bcc64 | bccosx | bcciosarm | bcciosarm64 | bccaarm | ||
Merge duplicate strings |
Merges two literal strings when one matches another. This produces smaller programs (at the expense of a slightly longer compile time) but can introduce errors if you modify one string. |
-d |
-fmerge-all-constants |
N/A |
-d |
N/A |
N/A |
N/A |
Read-only strings |
Put memory allocated for strings into the read-only data segment. The default is False. |
-dc |
-fconst-strings |
N/A |
-dc |
N/A |
N/A |
N/A |
Writable strings |
Put memory allocated for strings into the writable data segment. |
-dw |
-fwritable-strings |
N/A |
-dw |
N/A |
N/A |
N/A |