C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Predefined Identifiers
                                             Up Contents Index Back
─────C/C++ Compiler─────────────────────────────────────────────────────────
 
     The CL utility automatically defines identifiers useful in writing
     portable programs. You can use these identifiers to conditionally
     compile sections of code. These identifiers are always defined
     unless otherwise stated.
 
     Identifier          Specifies
 
     _CHAR_UNSIGNED      Default char type is unsigned. Identifier
                         defined when /J is specified.
     __cplusplus         Identifier defined when compiling a C++
                         program
     _DLL                Code that assumes a dynamic link library.
                         Identifier defined when /MD is specified.
     _FAST               Fast-Compile. Identifier defined when /f is
                         specified.
     M_I86   _M_I86      Member of the I86 processor family.
     M_I86mM _M_I86mM    Memory model type:
                         <m>= T            Tiny
                              S            Small (default)
                              C            Compact model
                              M            Medium model
                              L            Large model
                              H            Huge model
                         Identifiers defined by /AT, /AS, /AC, /AM,
                         /AL, and /AH, respectively.
     M_I8086 _M_I8086    8088 or 8086 processor; default or defined
                         when /G0 is specified.
     M_I286  _M_I286     80286 processor. Identifier defined when /G1
                         or /G2 is specified.
     M_I386  _M_I386     80386 processor. Identifier defined when /G3
                         is specified.
     _MSC_VER            Microsoft C version; currently defined as 700.
     MSDOS   _MSDOS      MS-DOS operating system.
     __STDC__            Full conformance with the ANSI C standard.
                         Identifier defined when /Za is specified.
     _PCODE              Translation to p-code. Identifier defined when
                         /Oq is selected.
     _QC                 Microsoft QuickC Compiler. Identifier defined
                         when /qc is specified. For Microsoft C
                         version 7, the /qc option is superseded by
                         the /f option.
     _WINDLL             Windows protected-mode dynamic-link library
                         is selected with /GD.
     _WINDOWS            Windows protected-mode is selected with /GA,
                         /Gn, /GW, /Mq, or /GD.
 
     NOTE:  If a predefined identifier has two forms, with and 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).
 
     See also: Removing Predefined Identifiers
               Memory-Model Selection
               Enabling and Disabling Language Extensions
               Changing Default Character Type
                                    -♦-