home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK1 / ERRATA1.TX$ / errata1
Encoding:
Text File  |  1992-03-19  |  39.7 KB  |  956 lines

  1.                                ERRATA1.TXT File
  2.  
  3.      Documentation Errata, Part One, for Microsoft(R) C/C++, Version 7.0
  4.  
  5.                   (C) Copyright Microsoft Corporation, 1992
  6.  
  7.      This document contains information on known errors and omissions
  8.      in the documentation provided with version 7.0 of Microsoft C/C++.
  9.      The information in this document and in the Microsoft Advisor
  10.      Help system is more up-to-date than that in the manuals.
  11.  
  12.      Microsoft updates its languages documentation at the time of
  13.      reprinting, so some of the information in this file may already be
  14.      included in your manuals.
  15.  
  16.  
  17. ================================< Contents >================================
  18.  
  19.  
  20.      This file has five parts:
  21.  
  22.                Part     Title
  23.                ----     -----
  24.                1        Notes on "Environment and Tools"
  25.  
  26.                2        Notes on "C++ Tutorial"
  27.  
  28.                3        Notes on "C Language Reference"
  29.  
  30.                4        Notes on "C++ Language Reference"
  31.  
  32.                5        Notes on "Programming Techniques"
  33.  
  34.      See also ERRATA2.TXT.
  35.  
  36.  
  37. ===============< Part 1: Notes on "Environment and Tools" >==================
  38.  
  39.      Page    Note
  40.      ----    ----
  41.  
  42.      24      Building the Program
  43.              --------------------
  44.  
  45.              This page describes how to run or debug a program that you
  46.              have just built from within PWB. It erroneously states that
  47.              you must return to the Program Manager to start your
  48.              Microsoft Windows(TM) program or CodeView(R) for Windows.
  49.              In fact, you can run and debug your Windows program directly
  50.              from PWB when the WX server is running. Do this by choosing
  51.              the Run and Debug commands from the PWB Run menu.
  52.  
  53.      50      Using Existing Projects
  54.              -----------------------
  55.  
  56.              The last item in the bulleted list on page 50 erroneously
  57.              states that PWB saves all environment variables for a
  58.              project. By default, PWB does not save the environment for
  59.              projects or between sessions. PWB uses the current
  60.              environment table.
  61.  
  62.              However, PWB is capable of restoring the environment table
  63.              for individual projects or between sessions. To enable
  64.              these features, change the settings of the Envprojsave and
  65.              Envcursave switches. For more information, see Chapter 7
  66.              of "Environment and Tools."
  67.  
  68.  
  69.      139     Project Status Files
  70.              --------------------
  71.  
  72.              The last item in the bulleted list in the second paragraph
  73.              on page 139 erroneously states that PWB saves all
  74.              environment variables for a project. By default, PWB does
  75.              not save the environment for projects or between sessions.
  76.              PWB uses the current environment table.
  77.  
  78.              However, PWB is capable of restoring the environment table
  79.              for individual projects or between sessions. To enable
  80.              these features, change the settings of the Envprojsave and
  81.              Envcursave switches. For more information, see Chapter 7
  82.              of "Environment and Tools."
  83.  
  84.      335     Transport
  85.              ---------
  86.  
  87.              Add the following to the end of the Transport entry's
  88.              Syntax line:
  89.  
  90.              [COM{1|2}:[rate]]
  91.  
  92.              Add the following paragraph after the transport table:
  93.  
  94.              "The optional [COM{1|2}:[rate]] specifies a communications
  95.              port and baud rate for remote debugging. No space is
  96.              allowed between COM and the port number (1 or 2). The
  97.              default port is COM1. The <rate> can be any number from
  98.              50 through 9600. The default rate is 9600."
  99.  
  100.      369     Source Window
  101.              -------------
  102.  
  103.              The table of options available in the Source Window Options
  104.              dialog box is incomplete. The dialog box also contains
  105.              options corresponding to each of the options for the VS
  106.              (View Source) command, listed on pages 457-458.
  107.  
  108.      387     Terminating Your Program
  109.              ------------------------
  110.  
  111.              Add the following paragraph to the bottom of the page:
  112.  
  113.              "You should also exercise caution when using the WKA command
  114.              on an application that loads a DLL. If you terminate the
  115.              application before it frees the DLL, the DLL remains
  116.              loaded. If you rebuild the DLL and then run CVW again, the
  117.              new version of the DLL doesn't get loaded."
  118.  
  119.      445     CodeView Command Window Options
  120.              ---------------------------------------
  121.  
  122.              The correct syntax for the Show Address option in
  123.              the CodeView Command window is:
  124.  
  125.                   OL[<scope>]
  126.  
  127.              instead of:
  128.  
  129.                   OL[[<scope>][+|-]]
  130.  
  131.      486     The CL Command Line
  132.              -------------------
  133.  
  134.              In the entry for the ".ASM" extension in the table of
  135.              filename extensions, the program name "ML.EXE" should be
  136.              "MASM.EXE".
  137.  
  138.      486     How the CL Command Works
  139.              ------------------------
  140.  
  141.              The following should be the first two paragraphs of
  142.              Section 13.2:
  143.  
  144.              "If you do not specify any optimization options, the CL
  145.              command uses the Disable Optimization option (/Od). Using
  146.              /Od causes CL to compile your program using the fast
  147.              compiler (/f). This feature allows you to quickly compile
  148.              code that is under development and to reserve use of the
  149.              optimizing compiler until it is needed.
  150.  
  151.              "Use the default fast compiler with the new precompiled
  152.              header options (/Yc, /Yd, /Yu, /Fp, and the hdrstop
  153.              pragma) to further speed compilation. See page 494 for more
  154.              information on the Fast Compile option, page 533 for more
  155.              information on the Disable Optimization option, and pages
  156.              546-550 for more information on precompiled headers."
  157.  
  158.      488     CL Options
  159.              ----------
  160.  
  161.              The third paragraph of this section should be replaced with
  162.              the following two paragraphs:
  163.  
  164.              "Options can appear anywhere on the CL command line. With
  165.              two exceptions (/c, /Fe), each CL option applies to the
  166.              files that follow it on the command line and does not
  167.              affect files preceding it on the command line.
  168.  
  169.              "It is not required that the /f or the /Oq option be first
  170.              on the command line."
  171.  
  172.              The fourth paragraph of this section should be replaced with
  173.              the following two paragraphs:
  174.  
  175.              "You can define CL options in response files. Unlike either
  176.              the command line or the CL environment variable, using a
  177.              response file allows multiple lines of options and
  178.              filenames. See Response Files below.
  179.  
  180.              "You can also define CL options in the CL environment variable.
  181.              These options are used every time you invoke CL. See
  182.              'Specifying Options with the CL Environment Variable' on
  183.              page 557."
  184.  
  185.      488     The following heading and associated text on response files
  186.              should immediately follow the CL Options section. The last
  187.              paragraph of the CL Options section should be moved to the
  188.              end of the Response Files section.
  189.  
  190.              Response Files
  191.              --------------
  192.  
  193.              The CL utility accepts a compiler "response file" as an
  194.              argument on the command line. A response file is an ASCII
  195.              file that can contain multiple options and filenames that
  196.              you would otherwise type on the command line or specify
  197.              by using the CL environment variable. Unlike either the
  198.              command line or the CL environment variable, using a
  199.              response file allows multiple lines of options and
  200.              filenames.
  201.  
  202.              The options in the response file are interpreted as if
  203.              they were present on the command line at the position of
  204.              the response file invocation. An exception to this rule
  205.              is the /link command. If /link appears in the response
  206.              file, all options on the rest of the line are passed to
  207.              the linker. Options in subsequent lines in the response
  208.              file and options on the command line after the response
  209.              file invocation are still accepted as compiler options.
  210.  
  211.              Note that a response file should not contain the CL
  212.              command. Also, each option must begin and end on the same
  213.              line; you cannot use the backslash (\) to concatenate an
  214.              option across two lines.
  215.  
  216.              To invoke a response file, type the at sign (@) followed
  217.              immediately by a filename; you can also specify a drive
  218.              and path. A response file invocation is not allowed in
  219.              the CL environment-variable string or in another response
  220.              file.
  221.  
  222.              For example, you could put the following into a file
  223.              named RESP:
  224.  
  225.                   /Od /Zp /link SLIBCE.LIB
  226.  
  227.              CL uses these options, in addition to any options you specify
  228.              on the CL command line. If you specify this CL command:
  229.  
  230.                   CL /Ob2 @RESP MYAPP.C
  231.  
  232.              the resulting command to CL is:
  233.  
  234.                   CL /Ob2 /Od /Zp MYAPP.C /link SLIBCE.LIB
  235.  
  236.              Note that the commands are effectively concatenated. You
  237.              can use NMAKE to create a temporary response file for a
  238.              single compilation step:
  239.  
  240.                   MYAPP.OBJ : MYAPP.C
  241.                       CL @<< MYAPP.C
  242.                   /DV100 /Lr /Od /Zp
  243.                   <<
  244.  
  245.      494     /f (Fast Compile)
  246.              -----------------
  247.  
  248.              Replace the discussion of /f with the following:
  249.  
  250.              Option   /f
  251.                       /f-
  252.  
  253.              Use the /f option to select the fast compiler and the /f-
  254.              option to select the optimizing compiler. If neither option
  255.              is specified, the compiler used depends on the optimizing
  256.              options specified:
  257.  
  258.              -  If no options are specified, the fast compiler is selected
  259.                 using no optimization options.
  260.  
  261.              -  If the Disable Optimization option (/Od) is specified,
  262.                 the fast compiler is used.
  263.  
  264.              -  If any optimizing option other than /Od is specified,
  265.                 the optimizing compiler is used.
  266.  
  267.              The /f option compiles source files without any default
  268.              optimizations. It defines the _FAST preprocessor constant.
  269.              Programs compiled with /f can be slower and larger, but
  270.              because they compile in less time than the optimizing
  271.              compiler requires, this option is useful during the
  272.              development process. The /f option does not support
  273.              initialized static huge data.
  274.  
  275.              If optimizations are disabled, the following options
  276.              generate warnings and start the optimizing compiler
  277.              instead of the fast compiler:
  278.  
  279.              Option     Description
  280.              ------     -----------
  281.  
  282.              /FPa       Selects fast alternate math package
  283.              /FPc       Selects emulation-calls math package
  284.              /FPc87     Selects 8087-calls math package
  285.              /Fs        Names source-file listing
  286.              /Ss        Specifies title for source-file listing
  287.              /St        Specifies subtitle for source-file listing
  288.              /Sl        Specifies line length for source-file listing
  289.              /Sp        Specifies page length for source-file listing
  290.  
  291.              Use the /f- option to suppress the warning generated when
  292.              using any of the eight options in the above list. When using
  293.              /f-, the /Od option is still the default. You can thus use
  294.              these eight options during the development process without
  295.              incurring the debugging difficulties caused by use of
  296.              optimization options other than /Od. The /Od option does
  297.              not reorganize code, making it easier to debug.
  298.  
  299.              If you put both the /f and /f- options on the command line,
  300.              CL uses whichever option occurs last.
  301.  
  302.      495     /Oq (Maximum P-Code Optimization)
  303.              ---------------------------------
  304.  
  305.              It is not required that the /Oq option appear first on the
  306.              CL command line.
  307.  
  308.      507     Replace the description of the Specify Precompiled Header
  309.              Filename option (/Fp) found on page 507 with the
  310.              description of /Fp found with the other precompiled header
  311.              file options on page 546.
  312.  
  313.      513     The NO87 Environment Variable
  314.              -----------------------------
  315.  
  316.              Replace the third sentence in the second paragraph with the
  317.              following:
  318.  
  319.              "The message is printed if a coprocessor is present and
  320.              suppressed, or if no coprocessor is present."
  321.  
  322.      516     /GE (Customize Windows Entry/Exit Code)
  323.              ---------------------------------------
  324.  
  325.              Replace the /GEf table entry with the following:
  326.  
  327.              /GEf     Treat all far functions as Windows callback
  328.                       functions.
  329.  
  330.      522     /Gw, /GW (Generate Entry/Exit Code for Real-Mode Windows)
  331.              ---------------------------------------------------------
  332.  
  333.              Remove "marked as __export" from the end of the first
  334.              sentence in the first paragraph.
  335.  
  336.              At the end of the first sentence in the second paragraph,
  337.              replace "functions not marked as __export" with "far
  338.              functions that are not Windows callback functions."
  339.  
  340.      528     /MA (Macro Assembler Options)
  341.              -----------------------------
  342.  
  343.              The last paragraph should read as follows:
  344.  
  345.              "Specifying .ASM files on the command line causes MASM.EXE
  346.              to be invoked. You can specify any option that MASM.EXE
  347.              accepts. If you have MASM 6.0, you cannot specify options
  348.              specific to ML.EXE."
  349.  
  350.      529     /ND (Name Data Segment)
  351.              -----------------------
  352.  
  353.              Add the following two paragraphs:
  354.  
  355.              "Using the /ND option with C++ requires special care. If a
  356.              module defining a derived class is compiled with the /ND
  357.              option while the module defining the base class is compiled
  358.              without /ND, a run-time error may result. This occurs
  359.              because the compiler treats the derived class's module data
  360.              segment as the default before it calls the base class
  361.              constructors. Consequently, the base class constructors use
  362.              the incorrect data segment.
  363.  
  364.              "To avoid this problem, you must ensure that /ND is either
  365.              used consistently throughout your class hierarchy, or not
  366.              used at all in the hierarchy."
  367.  
  368.      533     /Od (Turn Off Optimization)
  369.              ---------------------------
  370.  
  371.              Replace the paragraph on the /Od option with the following:
  372.  
  373.              "The /Od option tells the compiler to turn off all
  374.              optimizations in the program, which speeds compilation.
  375.              Because /Od suppresses code movement, you can use it to
  376.              simplify the debugging process. The Generate Debugging
  377.              Information option (/Zi) is discussed in this chapter on
  378.              page 553.
  379.  
  380.              "Note that using /Od selects the fast compiler (/f) unless you
  381.              explicitly specify /f-."
  382.  
  383.      538     /Op (Improve Float Consistency)
  384.              -------------------------------
  385.  
  386.              Add the following paragraph:
  387.  
  388.              "If you use the /Za (compile for ANSI compatibility)
  389.              option, CL uses the /Op option to improve the consistency
  390.              of floating-point tests for equality and inequality. This
  391.              use of /Op with /Za is for strict ANSI conformance and is
  392.              the only situation under which /Op is selected by
  393.              default. The /Op- option is provided to override the
  394.              default selection of /Op with /Za. Placing the /Op-
  395.              option on the command line with the /Za option will
  396.              disable /Op."
  397.  
  398.      550     /Za, /Ze (Enable or Disable Language Extensions)
  399.              ------------------------------------------------
  400.  
  401.              Add the following paragraph:
  402.  
  403.              "If you use the /Za option, CL uses the /Op option to
  404.              improve the consistency of floating-point tests for
  405.              equality and inequality; this use of /Op is for strict
  406.              ANSI conformance. A program compiled with /Op may be
  407.              slower and larger than one compiled without /Op. Placing
  408.              the /Op- option on the command line with the /Za option
  409.              will disable /Op."
  410.  
  411.      552     /Zc (Specify Pascal Naming)
  412.              ---------------------------
  413.  
  414.              The /Zc option is no longer supported.
  415.  
  416.      553     /Zi, /Zd (Compile and Link for Debugging)
  417.              -----------------------------------------
  418.  
  419.              Replace the discussion of the /Zi and /Zd options with the
  420.              following:
  421.  
  422.              "The /Zi option produces an object file containing line
  423.              numbers and full symbolic-debugging information for use
  424.              with the CodeView window-oriented debugger. If you do not
  425.              use the Compile Only (/c) option, the linker places this
  426.              information into the executable file. This symbolic
  427.              information is a map of your source code that the debugger
  428.              uses. It includes information on each module: its associated
  429.              name, line numbers, types, variables, and function names
  430.              with their return types. It also includes full symbol-table
  431.              information.
  432.  
  433.              "The /Zd option produces an object file and, without the use
  434.              of /c, an executable file containing only global and
  435.              external symbol information and line-number information.
  436.              Use this option when you want to reduce the size of an
  437.              executable file that you will be debugging with the
  438.              CodeView debugger. You can also use /Zd when you do not
  439.              need to use the expression evaluator during debugging.
  440.  
  441.              Example
  442.  
  443.                   CL /Zi TEST.C
  444.  
  445.              "This command produces an executable file named TEST.EXE,
  446.              which contains full symbolic debugging information for use
  447.              by CodeView."
  448.  
  449.      554     /Zp (Pack Structure Members)
  450.              ----------------------------
  451.  
  452.              Replace the Option line with the following:
  453.  
  454.                  Option    /Zp[{1|2|4|8|16}]
  455.  
  456.              Replace the third paragraph with the following:
  457.  
  458.              "Use the /Zp option to specify the same packing for all
  459.              structures in a module. When you give the /Zp<n> option,
  460.              where <n> is 1, 2, 4, 8, or 16, each structure member after
  461.              the first is stored on <n>-byte boundaries, depending on the
  462.              number you choose. If you use the /Zp option without an
  463.              argument, structure members are packed on one-byte
  464.              boundaries. No space is allowed between /Zp and its
  465.              argument."
  466.  
  467.      608     Overview
  468.              --------
  469.  
  470.              In the second sentence of the first paragraph, replace
  471.              "This file is required for DLLs and overlaid DOS programs"
  472.              with "This file should be used for DLLs and overlaid DOS
  473.              programs."
  474.  
  475.      623     The EXPORTS Statement
  476.              ---------------------
  477.  
  478.              Replace the syntax line for the EXPORTS statement with the
  479.              following:
  480.  
  481.              EXPORTS
  482.              entryname[=internalname][@ord[nametable]][NODATA][PRIVATE]
  483.  
  484.              Add the following paragraph to the bottom of the page:
  485.  
  486.              "The optional PRIVATE keyword tells IMPLIB to ignore the
  487.              definition. PRIVATE prevents <entryname> from being placed
  488.              in the import library. The keyword has no effect on LINK."
  489.  
  490.      674     In the Section "Calling NMAKE Recursively," remove these
  491.              sentences from the first paragraph:
  492.  
  493.              "When you call NMAKE recursively by macro rather than by
  494.              literally specifying the command NMAKE, NMAKE does not run
  495.              a new copy of itself. Instead, it uses its own stack for the
  496.              recursive parts of the build. This saves space in memory."
  497.  
  498.              Also remove the note at the end of that same section on
  499.              page 675.
  500.  
  501.      733     Methods for Increasing Efficiency
  502.              ---------------------------------
  503.  
  504.              The following heading and paragraph should be added:
  505.  
  506.              Using Precompiled Headers
  507.              -------------------------
  508.  
  509.              "Using Precompiled headers speeds up BSCMAKE because the
  510.              browser information for the precompiled code is generated
  511.              only when the .PCH file is created. The browser information
  512.              is not replicated in each source file's browser file, as
  513.              it is when you do not use precompiled headers. This reduces
  514.              the size of .SBR files for object files that use precompiled
  515.              headers and makes database building faster. Also, less disk
  516.              space is used."
  517.  
  518.      739     SBRPACK
  519.              -------
  520.  
  521.              The second paragraph should read as follows:
  522.  
  523.              "Packing .SBR files is optional. The Microsoft C/C++
  524.              Compiler version 7.0 (CL) automatically calls SBRPACK when
  525.              you specify either /FR or /Fr to create an .SBR file. If you
  526.              specify /Zn, CL does not call SBRPACK to pack the .SBR file.
  527.              Other compilers and assemblers do not pack .SBR files. You
  528.              may want to use SBRPACK to pack an .SBR file that was
  529.              created without packing."
  530.  
  531.      864     Index
  532.              -----
  533.  
  534.              Add the following after "PWB, 307-308" under "Regular
  535.              expressions, matching":
  536.  
  537.              "UNIX, 778, 785"
  538.  
  539. ===================< Part 2: Notes on "C++ Tutorial" >=======================
  540.  
  541.      Page    Note
  542.      ----    ----
  543.  
  544.      119     Collections Using Base Class Pointers
  545.              -------------------------------------
  546.  
  547.              In the example of the "printNames" function that appears at
  548.              the bottom of the page, the following three lines should be
  549.              added immediately before the "while" loop:
  550.  
  551.              person = anIter.getFirst();
  552.              count++;
  553.              cout << count << ' ' << person->getName() << '\n';
  554.  
  555. ================< Part 3: Notes on "C Language Reference" >==================
  556.  
  557.      Page    Note
  558.      ----    ----
  559.  
  560.      32      Parsing Command-Line Arguments (Microsoft Specific)
  561.              ---------------------------------------------------
  562.  
  563.              The second line in the table at the bottom of the page
  564.              should read as follows:
  565.  
  566.              Command-Line Input    argv[1]   argv[2]   argv[3]
  567.  
  568.              "ab\"c" "\\" d        ab"c       \        d
  569.  
  570.      59      Data Declarations with the __based Keyword
  571.              ------------------------------------------
  572.  
  573.              The second sentence in the third paragraph should read: "The
  574.              <string-literal> can be the name of a predefined segment
  575.              ('_CODE', '_CONST' or '_DATA', but not '_STACK'), or it
  576.              can be the name of a new segment you define."
  577.  
  578.      127     Multiplicative Operators
  579.              ------------------------
  580.  
  581.              In the table describing the multiplicative operators,
  582.              the second subentry in the entry for the % (remainder)
  583.              operator should read: "If both operands are positive or
  584.              unsigned, the result is positive."
  585.  
  586.      155     The do-while Statement
  587.              ----------------------
  588.  
  589.              The syntax line at the top of the page should end with
  590.              a semicolon.
  591.  
  592.      171     Fastcall Functions
  593.              ------------------
  594.  
  595.              Add the following material:
  596.  
  597.              Windows entry/exit code and the __fastcall calling
  598.              convention can conflict in their use of the ax register.
  599.              As a result, using the following combinations of options
  600.              and keywords will generate errors:
  601.  
  602.              - __fastcall, __far, Gw
  603.              - __fastcall, __far, __export, GA
  604.              - __fastcall, __far, __export, GD
  605.              - __fastcall, __far, GA, GEf
  606.              - __fastcall, __far, GD, GEf
  607.              - __fastcall, __far, __export, GA, GEf
  608.              - __fastcall, __far, __export, GD, GEf
  609.  
  610.      185     Arguments
  611.              ---------
  612.  
  613.              In the third paragraph from the bottom of the page, the
  614.              first sentence should read: "The order in which arguments
  615.              are evaluated can vary under different compilers and
  616.              optimization levels."
  617.  
  618.      200     Predefined Macros
  619.              -----------------
  620.  
  621.              The table of predefined macros should include all of the
  622.              following:
  623.  
  624.              Identifier          Specifies
  625.  
  626.              _CHAR_UNSIGNED      Default char type is unsigned.
  627.                                  Identifier defined when /J is specified.
  628.              __cplusplus         Identifier defined when compiling a C++
  629.                                  program.
  630.              _DLL                Code that assumes a dynamic-link library.
  631.                                  Identifier defined when /MD is specified.
  632.              _FAST               Fast compile. Identifier defined when /f
  633.                                  is specified.
  634.              M_I86   _M_I86      Member of the I86 processor family.
  635.              M_I86mM _M_I86mM    Memory model type:
  636.                                  <m>= T            Tiny
  637.                                       S            Small (default)
  638.                                       C            Compact model
  639.                                       M            Medium model
  640.                                       L            Large model
  641.                                       H            Huge model
  642.                                  Identifiers defined by /AT, /AS, /AC, /AM,
  643.                                  /AL, and /AH, respectively.
  644.              M_I8086 _M_I8086    8088 or 8086 processor; default or defined
  645.                                  when /G0 is specified.
  646.              M_I286  _M_I286     80286 processor. Identifier defined when
  647.                                  /G1 or /G2 is specified.
  648.              M_I386  _M_I386     80386 processor. Identifier defined when
  649.                                  /G3 is specified.
  650.              _MSC_VER            Microsoft C version; currently defined as
  651.                                  the string "700".
  652.              MSDOS   _MSDOS      MS-DOS operating system.
  653.              __STDC__            Full conformance with the ANSI C standard.
  654.                                  Identifier defined when /Za is specified.
  655.              _PCODE              Translation to p-code. Identifier defined
  656.                                  when /Oq is selected.
  657.              _QC                 Microsoft QuickC(R) Compiler. Identifier
  658.                                  defined when /qc is specified. For
  659.                                  Microsoft C/C++ version 7.0, the /qc
  660.                                  option is superseded by the /f option.
  661.              __TIMESTAMP__       Date and time of the last modification of
  662.                                  the source file, expressed as a string
  663.                                  literal in the form:
  664.                                       "Ddd Mmm hh:mm:ss yyyy"
  665.              _WINDLL             Windows protected-mode dynamic-link
  666.                                  library is selected with /GD.
  667.              _WINDOWS            Windows protected-mode is selected with
  668.                                  /GA, /Gn, /GW, /Mq, or /GD.
  669.  
  670.              NOTE:  If a predefined identifier has two forms, with and
  671.                     without an underscore, the command-line driver defines
  672.                     both if you specify the /Ze option (compile for
  673.                     Microsoft extensions). It defines only the leading
  674.                     underscore form if you specify the /Za option (compile
  675.                     for ANSI compatibility).
  676.  
  677.      210     Pragma Directives (Microsoft Specific)
  678.              --------------------------------------
  679.  
  680.              Replace the second occurrence of "check_stack" with
  681.              "inline_depth". Also, insert "init_seg" between
  682.              "inline_recursion" and "intrinsic".
  683.  
  684.      211     Pragma Directives (Microsoft Specific)
  685.              --------------------------------------
  686.  
  687.              Add the following syntax line and discussion for the
  688.              init_seg pragma:
  689.  
  690.              #pragma init_seg({ compiler | lib | user | "seg-name" })
  691.  
  692.              "Specifies a keyword or segment that affects the order in
  693.              which startup code is executed. Because initialization
  694.              of global static objects can involve executing code, you
  695.              must specify a keyword that defines when the objects are
  696.              to be constructed. It is particularly important to use
  697.              the init_seg pragma in DLLs or libraries requiring
  698.              initialization.
  699.  
  700.              "The 'compiler' option is reserved for Microsoft C
  701.              run-time library initialization. Objects in this group
  702.              are constructed first. The 'lib' option is available
  703.              for third-party class-library vendors' initializations.
  704.              Objects in this group are constructed after those
  705.              marked as compiler but before any others. The 'user' is
  706.              available to any user. Objects in this group are
  707.              constructed last. The 'seg-name' allows explicit
  708.              specification of the initialization segment. Objects in
  709.              a user-specified <seg_name> are not implicitly
  710.              constructed; however, their addresses are placed in the
  711.              segment named by <seg-name>.
  712.  
  713.              "If you need to defer initialization (for example, in a
  714.              DLL), you may choose to specify the segment name
  715.              explicitly. You must then call the constructors for each
  716.              static object. For an example of how these
  717.              initializations are done, see the file CRT0DAT.ASM in
  718.              the \SOURCE\STARTUP\DOS subdirectory."
  719.  
  720.      241     Truncation of Floating-Point Values
  721.              -----------------------------------
  722.  
  723.              The last sentence of the paragraph should read: "An overflow
  724.              may cause a run-time error or it may produce an unpredictable
  725.              value, depending on the optimizations specified."
  726.  
  727.      254     Time Returned by the time Function
  728.              ----------------------------------
  729.  
  730.              The following paragraph should be added:
  731.  
  732.              "The type time_t returned by the time and mktime functions
  733.              is now defined as unsigned long instead of long. Because
  734.              the implementation can change, code that relies on the
  735.              underlying implementation of an inplementation-specific
  736.              type is not portable."
  737.  
  738. ===============< Part 4: Notes on "C++ Language Reference" >=================
  739.  
  740.      Page    Note
  741.      ----    ----
  742.  
  743.      11      C++ Operator Precedence, Syntax, and Associativity
  744.              --------------------------------------------------
  745.  
  746.              The equality operator (==) should be moved from the top of
  747.              the table to become the third entry on page 13. The equality
  748.              operator has the same precedence as the inequality operator,
  749.              and the precedence of both operators is lower than that
  750.              of the less-than-or-equal-to and greater-than-or-equal-to
  751.              operators.
  752.  
  753.      82      Positive and Negative Subscripts
  754.              --------------------------------
  755.  
  756.              In the example for negative subscripts, the line
  757.  
  758.              int *iNumberLine = &iNumberLine[512];
  759.  
  760.              should be
  761.  
  762.              int *iNumberLine = &iNumberArray[512];
  763.  
  764.      152     Declaration of Static Objects
  765.              -----------------------------
  766.  
  767.              Add the following sentence to the first paragraph:
  768.  
  769.              "You cannot declare static objects in a tiny-model program."
  770.  
  771.      196     Pointers to Members
  772.              -------------------
  773.  
  774.              Insert the following after the first sentence in the second
  775.              paragraph of this section:
  776.  
  777.              "A class must be defined before a pointer to a member of
  778.              that class can be declared."
  779.  
  780.      202     Interpretation of the Subscript Operator
  781.              ----------------------------------------
  782.  
  783.              The formula for deriving the address of a multidimensional
  784.              array should read as follows:
  785.  
  786.              *((array-name) + (subscript1 * max2 * max3 ... maxn)
  787.                             + (subscript2 * max3 * ... maxn)
  788.                             ...
  789.                             + (subscriptn))
  790.  
  791.      239     Declaring Unsized Arrays in Member Lists (Microsoft Specific)
  792.              -------------------------------------------------------------
  793.  
  794.              Add the following sentence to the first paragraph in the
  795.              Restrictions section:
  796.  
  797.              "A class containing an unsized array cannot have a direct
  798.              or indirect virtual base class."
  799.  
  800.      374     Predefined Macros
  801.              -----------------
  802.  
  803.              Add the following two Microsoft-compatible predefined macros
  804.              to Table 13.1:
  805.  
  806.              _WINDLL             Windows protected-mode dynamic-link
  807.                                  library is selected with /GD.
  808.              _WINDOWS            Windows protected-mode is selected with
  809.                                  /GA, /Gn, /GW, /Mq, or /GD.
  810.  
  811. ===============< Part 5: Notes on "Programming Techniques" >=================
  812.  
  813.      Page    Note
  814.      ----    ----
  815.  
  816.      6       Controlling Optimizations from PWB
  817.              ----------------------------------
  818.  
  819.              The second sentence on the page should read: "From that
  820.              dialog box, you can specify the options for either a debug
  821.              or release compile."
  822.  
  823.      19      Performing Loop Optimizations (/Ol)
  824.              -----------------------------------
  825.  
  826.              In the last sentence on the page, the words "the g option"
  827.              should be "the l option."
  828.  
  829.      25      Optimizing for Maximum Efficiency (/Ox)
  830.              ---------------------------------------
  831.  
  832.              In the list of options implied by /Ox, the entry "Perform
  833.              maximum inlining (/Ob2)" should be removed. The /Ox option
  834.              selects the default level of inlining (/Ob1) for an optimized
  835.              program.
  836.  
  837.              For the fastest program possible, use the following
  838.              options:
  839.  
  840.                   /Ozaxb2 /Gr
  841.  
  842.              For the smallest program possible, use the following
  843.              options:
  844.  
  845.                   /Oase /Gs
  846.  
  847.              Note that you can use /Oa only if your code contains no
  848.              aliasing. If your code contains aliasing, use the following
  849.              options:
  850.  
  851.                   /Ose /Gs
  852.  
  853.      35      Precompiled Header Filename Option (/Fp)
  854.              ----------------------------------------
  855.  
  856.              In the first example, "/FpDPROG" should be "/FpDPROG.PCH".
  857.              In the second example, "/FpRPROG" should be
  858.              "/FpRPROG.PCH". The /Fp option does not assume the .PCH
  859.              extension for the name of the precompiled header file;
  860.              you must specify it explicitly.
  861.  
  862.      60      The Tiny Memory Model
  863.              ---------------------
  864.  
  865.              Add the following paragraph to the end of the section:
  866.  
  867.              "If you are programming in C++, you cannot construct static
  868.              objects under the tiny model. Since the predefined stream
  869.              objects (like cin and cout) are static objects, you cannot
  870.              use iostreams in a tiny-model program."
  871.  
  872.      86      Data Stored in a Named Segment
  873.              ------------------------------
  874.  
  875.              You cannot store data in the _STACK segment. Of the four
  876.              predefined segments, you can store data in only the _CODE,
  877.              _DATA, and _CONST segments.
  878.  
  879.      95      Techniques for Using Virtual Memory
  880.              -----------------------------------
  881.  
  882.              In the first paragraph following the example, the words
  883.              "the search function" should be "the find function."
  884.  
  885.      122     The example of an __asm block in "Calling C Functions" fails
  886.              to clean up the stack.  The following line needs to be added
  887.              at the end of the __asm block after the printf statement:
  888.  
  889.              add sp,6
  890.  
  891.              This removes the parameters that were passed on the stack.
  892.  
  893.      153     QuickWin vs. Windows Applications
  894.              ---------------------------------
  895.  
  896.              Add the following entry to the list of QuickWin's
  897.              limitations:
  898.  
  899.              - Use the stdprn or stdaux streams.
  900.  
  901.      175     Limitations of VESA Support
  902.              ---------------------------
  903.  
  904.              Change the third item in the list to the following:
  905.  
  906.              "Super VGA BIOS functions 2, 3, 6, 7, and 9 must be
  907.              supported. See section 6 of the VESA Super VGA Standard
  908.              for more information."
  909.  
  910.              Change the fourth item in the list to the following:
  911.  
  912.              "Three types of hardware windows are supported: single
  913.              window systems with a readable/writable 64K window
  914.              beginning at A000h, dual overlapping 64K windows beginning
  915.              at A000h, and dual adjacent 32K readable/writable windows
  916.              beginning at A000h and A800h. See section 5.2.1 of the
  917.              VESA Super VGA Standard for more information."
  918.  
  919.      248     Calling a Pascal Function from C
  920.              --------------------------------
  921.  
  922.              In the example at the top of the page, the definition for
  923.              the Pascal function Fact should be replaced with the
  924.              following:
  925.  
  926.              FUNCTION Fact (n : INTEGER) : INTEGER;
  927.  
  928.              VAR
  929.                  temp : INTEGER;
  930.  
  931.              BEGIN
  932.                  temp := 1;
  933.                  WHILE n > 0 DO
  934.                  BEGIN
  935.                      temp := temp * n;
  936.                      n := n - 1;
  937.                  END;
  938.                  Fact := temp;
  939.              END;
  940.  
  941.      277     Byte Order in a Word
  942.              --------------------
  943.  
  944.              The implementation of the two macros LOBYTE and HIBYTE
  945.              assumes that type unsigned is always twice the size of
  946.              type char. Because ANSI does not require this relationship,
  947.              these macros are not completely portable.
  948.  
  949. ============================================================================
  950.  
  951.      Microsoft, MS, MS-DOS, CodeView and QuickC are registered trademarks,
  952.      and Windows is a trademark of Microsoft Corporation.
  953.  
  954.      UNIX is a registered trademark of American Telephone & Telegraph
  955.      Company.
  956.