📄 cpopts.gml
字号:
.fi OS2.H
are included.
.do end
.*
.if &e'&$SWd3i eq 1 .do begin
:OPT refid='SWd3i' name='d3i'.
.ix 'options' 'd3i'
(C++ only)
This option is identical to "d3" but does not permit in-lining of
functions.
Functions are emitted as external out-of-line functions.
This option can result in larger object and/or executable files than
with "d3" (we are discussing both "code" and "file" size here).
.do end
.*
.if &e'&$SWd3s eq 1 .do begin
:OPT refid='SWd3s' name='d3s'.
.ix 'options' 'd3s'
(C++ only)
This option is identical to "d3" but does not permit in-lining of
functions.
Functions are emitted as static out-of-line functions.
This option can result in larger object and/or executable files than
with "d3" or "d3i" (we are discussing both "code" and "file" size
here).
Link times are faster than "d3i" (fewer segment relocations) but
executables are slightly larger.
.do end
.*
.if &e'&$SWee eq 1 .do begin
:OPT refid='SWee' name='ee'.
.ix 'options' 'ee'
&x86only.
This option causes the compiler to generate a call to
.kwm __EPI
in the epilogue sequence at the end of every function.
This user-written routine can be used to collect/record profiling
information.
.if &e'&dohelp eq 0 .do begin
Other related options are :HDREF refid='SWep'. and
:HDREF refid='SWen'..
.do end
.ix 'macros' '__SW_EE'
The macro
.kwm __SW_EE
will be predefined if "ee" is selected.
.do end
.*
.if &e'&$SWen eq 1 .do begin
:OPT refid='SWen' name='en'.
.ix 'options' 'en'
&x86only.
The compiler will emit the function name into the object code as a
string of characters just before the function prologue sequence is
generated.
The string is terminated by a byte count of the number of characters
in the string.
.millust begin
; void Toaster( int arg )
db "Toaster", 7
public Toaster
Toaster label byte
.
.
.
ret
.millust end
.pc
This option is intended for developers of embedded systems (ROM-based
applications).
It may also be used in conjunction with the "ep" option
for special user-written profiling applications.
.ix 'macros' '__SW_EN'
The macro
.kwm __SW_EN
will be predefined if "en" is selected.
.do end
.*
.if &e'&$SWep eq 1 .do begin
:OPT refid='SWep' name='ep'.[<number>]
.ix 'options' 'ep'
&x86only.
This option causes the compiler to generate a call to a user-written
.kwm __PRO
routine in the prologue sequence at the start of every function.
This routine can be used to collect/record profiling information.
The optional argument
.sy <number>
can be used to cause the compiler to allocate that many bytes on the
stack as a place for
.kwm __PRO
to store information.
.if &e'&dohelp eq 0 .do begin
Other related options are :HDREF refid='SWee'. and
:HDREF refid='SWen'..
.do end
.ix 'macros' '__SW_EP'
The macro
.kwm __SW_EP
will be predefined if "ep" is selected.
.do end
.*
.if &e'&$SWet eq 1 .do begin
:OPT refid='SWet' name='et'.
.ix 'options' 'et'
(Pentium only)
This option causes the compiler to generate code into the prolog of
each function to count exactly how much time is spent within that
function, in clock ticks.
This option is valid only for Pentium compatible processors (i.e., the
instructions inserted into the code do not work on 486 or earlier
architectures).
The Pentium "rdtsc" opcode is used to obtain the instruction cycle
count.
.np
At the end of the execution of the program, a file will be written to
the same location as the executable, except with a "&prf" extension.
The contents of the file will look like this:
.exam begin
1903894223 1 main
1785232334 1376153 StageA
1882249150 13293 StageB
1830895850 2380 StageC
225730118 99 StageD
.exam end
.np
The first column is the total number of clock ticks spent inside of
the function during the execution of the program,
the second column is the number of times it was called
and the third column is the individual function name.
The total number of clock ticks includes time spent within functions
called from this function.
.np
The overhead of the profiling can be somewhat intrusive, especially
for small leaf functions (i.e., it may skew your results somewhat).
.if '&target' eq 'QNX' .do begin
.np
Some versions of QNX emulate the "rdtsc" opcode on earlier processors
by catching the invalid opcode fault and fishing the timer.
Thus, the "et" option may work on other processors but will be a lot
less accurate on non-Pentium processors.
.do end
.do end
.*
.if &e'&$SWhwdc eq 1 .do begin
:OPT refid='SWhwdc' name='h'.{w,d,c}
.ix 'debugging information format'
.ix 'options' 'hw'
.ix 'options' 'hd'
.ix 'options' 'hc'
The type of debugging information that is to be included in the object
file is one of "&company", "DWARF" or "Codeview".
The default is "DWARF".
.np
If you wish to use the Microsoft Codeview debugger, then choose the
"hc" option (this option causes Codeview Level 4 information to be
generated).
.ix 'CVPACK'
.ix 'Debugging Information Compactor'
It will be necessary to run the Microsoft Debugging Information
Compactor, CVPACK, on the executable once the linker has created it.
For information on requesting the linker to automatically run CVPACK,
see the section entitled "OPTION CVPACK" in the
.if '&target' eq 'QNX' .do begin
part of this guide that describes the &lnkname..
.do end
.el .do begin
.book &lnkname User's Guide.
.do end
Alternatively, you can run CVPACK from the command line.
.np
When linking the application, you must also choose the appropriate
&lnkname DEBUG directive.
.if '&target' eq 'QNX' .do begin
See the part of this guide that describes the &lnkname
for more information.
.do end
.el .do begin
See the
.book &lnkname User's Guide
for more information.
.do end
.do end
.*
.if &e'&$SWs eq 1 .do begin
:OPT refid='SWs' name='s'.
.ix 'stack overflow'
.ix 'options' 's'
Stack overflow checking is omitted from the generated code.
By default, the compiler will emit code at the beginning of every
function that checks for the "stack overflow" condition.
This option can be used to disable this feature.
.ix 'macros' '__SW_S'
The macro
.kwm __SW_S
will be predefined if "s" is selected.
.do end
.*
.if &e'&$SWsi eq 1 .do begin
:OPT refid='SWsi' name='si'.
.ix 'stack growing'
.ix 'options' 'si'
&AXPonly.
This option can be used to initialize stack frame storage with a
pattern.
This option is useful for debugging an application since it sets up
the stack frame with a predictable pattern.
.np
.ix 'macros' '__SW_SI'
The macro
.kwm __SW_SI
will be predefined if "si" is selected.
.do end
.*
:eOPTLIST.
.*
.section Preprocessor
.*
.np
This group of options deals with the compiler preprocessor.
.*
:OPTLIST.
.*
.if &e'&$SWd eq 1 .do begin
:OPT refid='SWd' name='d'.<name>[=text]
.ix 'options' 'd'
This option can be used to define a preprocessor macro from the
command line.
If
.us =text
is not specified, then 1 is assumed.
In other words, specifying
.mono &sw.dDBGON
is equivalent to specifying
.mono &sw.dDBGON=1
on the command line.
.np
If
.us =text
is specified, then this option is equivalent to including the
following line in your source code.
.millust begin
#define name text
.millust end
.np
Consider the following example.
.exam begin 1
d_MODDATE="87.05.04"
.exam end
.pc
The above example is equivalent to a line in the source file
containing:
.millust begin
#define _MODDATE "87.05.04"
.millust end
.do end
.*
.if &e'&$SWdpls eq 1 .do begin
:OPT refid='SWdpls' name='d+'.
.ix 'options' 'd+'
The syntax of any "d" option which follows on the command line is
extended to include &lang tokens as part of "text".
The token string is terminated by a space character.
This permits more complex syntax than is normally allowed.
.exam begin 1
&sw.d+ &sw.d_radx=x*3.1415926/180
.exam end
.np
This is equivalent to specifying the following in the source code.
.exam begin 1
#define _radx x*3.1415926/180
.exam end
.np
&cmppname extends this feature by allowing parameterized macros.
When a parameter list is specified, the "=" character must not be
specified.
It also permits immediate definition of the macro as shown in the
second line of the example.
.exam begin 2
&sw.d+ &sw.d_rad(x)x*3.1415926/180
&sw.d+_rad(x)x*3.1415926/180
.exam end
.np
This is equivalent to specifying the following in the source code.
.exam begin 1
#define _rad(x) x*3.1415926/180
.exam end
.do end
.*
.if &e'&$SWfo eq 1 .do begin
:OPT refid='SWfo' name='fo'.[=<file_name>] (preprocessor)
.ix 'options' 'fo'
.ix 'preprocessor'
The "fo" option is used with any form of the "p" (preprocessor) option
to name the output file &drive, path, file name and extension.
If the output file name is not specified, it is constructed from the
source file name.
If the output file extension is not specified, it is "&pxt" by
default.
.exam begin 1
&prompt.:SF font=1.compiler_name:eSF. report &sw.p &sw.fo=&dr4.&pc.proj&pc.prep&pc
.exam end
.pc
A trailing "&pc" must be specified for directory names.
If, for example, the option was specified as
.mono fo=&dr4&pc.proj&pc.prep
then the output file would be called
.fi &dr4.&pc.proj&pc.prep.i
.ct ~.
A default filename extension must be preceded by a period (".").
.exam begin 1
&prompt.:SF font=1.compiler_name:eSF. report &sw.p &sw.fo=&dr4.&pc.proj&pc.prep&pc..cpr
.exam end
.do end
.if &e'&$SWpil eq 1 .do begin
:OPT refid='SWpil' name='pil'.
.ix 'options' 'pil'
By default, #line directives embedded in source files are processed and
will be used as a basis for file name and line number information in error
messages, __FILE__ and __LINE__ symbols, etc. The "pil" option causes the
preprocessor to ignore #line directives and refer to actual file names and
line numbers.
.do end
.*
.if &e'&$SWp eq 1 .do begin
:OPT refid='SWp' name='p'.{e,l,c,w=<num>}
.ix 'options' 'p'
.ix 'options' 'pc'
.ix 'options' 'pe'
.ix 'options' 'pl'
.ix 'options' 'pw'
.ix 'preprocessor'
The input file is preprocessed and, by default, is written to the
standard output file.
The "fo" option may be used to redirect the output to a file with
default extension "&pxt".
.np
.ix 'preprocessor' 'source comments'
Specify "pc" if you wish to include the original source comments in
the &product preprocessor output file.
.np
.ix 'preprocessor' 'encryption'
(C++ Only) Specify "pe" if you wish to encrypt the original
identifiers when they are written to the &product preprocessor output
file.
.np
.ix 'line directive'
.ix '#line'
.ix 'preprocessor' '#line directives'
Specify "pl" if you wish to include
.id #line
directives.
.np
Specify "pcl" or "plc" if you wish both source comments and #line
directives.
.np
Use the "w=<num>" suffix if you wish to wish output lines to wrap at
<num> columns.
Zero means no wrap.
.exam begin 1
&prompt.:SF font=1.compiler_name:eSF. report &sw.pcelw=80
.exam end
.np
The input file is preprocessed only.
When only "p" is specified, source comments and #line directives are
not included.
You must request these using the "c" and "l" suffixes.
When the output of the preprocessor is fed into the compiler,
the
.id #line
directive enables the compiler to issue diagnostics in terms of line
numbers of the original source file.
.np
The options which are supported when the &product preprocessor is
requested are: "d", "fi", "fo", "i", "m?", and "u".
.do end
.*
.if &e'&$SWu eq 1 .do begin
:OPT refid='SWu' name='u'.<name>
.ix 'options' 'u'
The "u" option may be used to turn off the definition of a predefined
macro.
If no name is specified then all predefined macros
:CMT. with the exception of the memory model macros
are undefined.
:CMT. ????????????????????????
:CMT. ?? ?????
:CMT. ?? This needs work ?????
:CMT. ?? ?????
:CMT. ????????????????????????
.exam begin 1
&prompt.:SF font=1.compiler_name:eSF. report &sw.uM_I386
.exam end
.do end
.*
:eOPTLIST.
.*
.section Diagnostics
.*
.np
This group of options deals with the control of compiler diagnostics.
.*
:OPTLIST.
.*
.if &e'&$SWe eq 1 .do begin
:OPT refid='SWe' name='e'.<number>
.ix 'options' 'e'
The compiler will stop compilation after reaching
.sy <number>
errors.
By default, the compiler will stop compilation after 20 errors.
.do end
.*
.if &e'&$SWef eq 1 .do begin
:OPT refid='SWef' name='ef'.
.ix 'options' 'ef'
This option causes the compiler to display full path names for files
in error messages.
.do end
.*
.if &e'&$SWeq eq 1 .do begin
:OPT refid='SWeq' name='eq'.
.ix 'options' 'eq'
This option causes the compiler to not display error messages on the
console; however, they are still written to a file
:optref refid='SWfr'..
.do end
.*
.if &e'&$SWer eq 1 .do begin
:OPT refid='SWer' name='er'.
.ix 'options' 'er'
(C++ only)
This option causes the C++ compiler to not recover from undefined
symbol errors.
By default, the compiler recovers from "undefined symbol" errors by
injecting a special entry into the symbol table that prevents further
issuance of diagnostics relating to the use of the same name.
Specify the "er" option if you want all uses of the symbol to be
diagnosed.
.exam begin
struct S {
};
void foo( S *p ) {
p->m = 1; // member 'm' has not been declared in 'S'
}
void bar( S *p ) {
p->m = 2; // no error unless "er" is specified
}
.exam end
.do end
.*
.*
.if &e'&$SWew eq 1 .do begin
:OPT refid='SWew' name='ew'.
.ix 'options' 'ew'
(C++ only)
This option causes the C++ compiler to generate equivalent but less
verbose diagnostic messages.
.do end
.*
.if &e'&$SWq eq 1 .do begin
:OPT refid='SWq' name='q'.
.ix 'options' 'q'
This option is equivalent to the "zq" option :optref refid='SWzq'..
.do end
.*
.if &e'&$SWt eq 1 .do begin
:OPT refid='SWt' name='t'.=<num>
.ix 'options' 't'
.ix 'preprocessor'
(C++ only)
The "t" option is used to set the tab stop interval.
By default, the compiler assumes a tab stop occurs at multiples
of 8 (1+n x 8 = 1, 9, 17, ... for n=0, 1, 2, ...).
When the compiler reports a line number and column number in a
diagnostic message, the column number has been adjusted for
intervening tabs.
If the default tab stop setting for your text editor is not a multiple
of 8, then you should use this option.
.exam begin 1
&prompt.:SF font=1.compiler_name:eSF. report &sw.t=4
.exam end
.do end
.*
.if &e'&$SWw eq 1 .do begin
:OPT refid='SWw' name='w'.<number>
.ix 'options' 'w'
The compiler will issue only warning type messages of severity
.sy <number>
or below.
Type 1 warning messages are the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -