/Uname
/u
The /U (for “undefine”) option turns off the definition of the specified defined name. The /u option turns off every defined name. The /U and the /u options apply both to predefined names and to names that you define.
These names are useful in writing portable programs. For instance, they can be used with compiler directives to conditionally compile parts of a program, depending on the processor and operating system being used. The predefined identifiers and their meanings are listed in Table 13.9.
One or more spaces can separate /U and name. You can specify more than one /U option on the same command line.
Table 13.9 Predefined Names
Syntax | Purpose | When Defined |
_CHAR_UNSIGNED | Specifies that the char type is unsigned by default. | When /J is given |
_DLL | Specifies a DLL run-time library. | When /MD is given |
_FAST | Specifies Fast Compile. | When /f is given |
M_I86, _M_I86 | Specifies target machine as a member of the Intel family. | Always |
M_I86mM, _M_I86mM | Specifies memory model, where m is either T (tiny model), S (small model), C (compact model), M (medium model), L (large model), or H (huge model). If huge model is used, both _M_I86LM and _M_I86HM are defined. | Always |
M_I8086, _M_I8086 | Specifies target machine as an 8086. | When /G0 is given and by default |
M_I286, _M_I286 | Specifies target machine as an 80286. | When /G1 or /G2 is given |
M_I386, _M_I386 | Specifies target machine as an 80386. | When /G3 is given |
_MSC_VER | Specifies version of Microsoft C currently supported. Equal to 700. | Always |
MSDOS, _MSDOS | Specifies target operating system as MS-DOS. | Always |
_QC | Specifies Quick Compile | When /qc is selected |
_PCODE | Specifies p-code. | When /Oq is selected |
__STDC__ | Specifies full conformance with the ANSI C standard. | When /Za is selected |
_WINDLL | Specifies protected-mode dynamic-linked library | When /GD is selected |
_WINDOWS | Specifies protected-mode Windows | When /GA, /GE, /Gn, /GW, /Mq, and /GD are selected |
Note:
If a predefined identifier has two forms, one with and one without an underscore, the command-line driver defines both if you specify the /Ze option (compile for Microsoft extensions). It defines only the leading underscore form if you specify the /Za option (compile for ANSI compatibility).
You can define 30 identifiers.
Example
CL /UMSDOS /UM_I86 WORK.C
This example removes the definitions of two predefined names. Note that the /U option must be given twice to do this.