ID Number: Q66773
6.00 6.00a 6.00ax 7.00 | 6.00 6.00a
MS-DOS | OS/2
buglist6.00 buglist6.00a buglist6.00ax buglist7.00
Summary:
SYMPTOMS
The Microsoft C Optimizing Compiler versions 6.0, 6.0a, 6.0ax, and
C/C++ version 7.0 provide options for generating assembly language
listings from C source files. In cases where based allocation is
used, the assembly language listings produced with /Fa (.ASM files)
and /Fc (.COD files) contain an error. The EXTRN directive emitted
for based variables is located in the wrong place.
CAUSE
The EXTRN directive for a based variable should be located between
the SEGMENT and ENDS directives for the segment in which the
variable is declared to reside. This allows MASM to generate the
correct fixups for references to this variable, which in turn
enables LINK to detect whether the variable is actually defined in
the specified segment.
RESOLUTION
To workaround this problem, edit the .ASM or .COD listing so that
the EXTRN directives for based variables are located between the
correct SEGMENT and ENDS directives.
Note that this problem also occurs for functions specified in an
alloc_text pragma.
STATUS
Microsoft has confirmed this to be a problem in C versions 6.0,
6.0a, 6.0ax, and 7.0. We are researching this problem and will post
new information here as it becomes available.
Additional reference words: _based 6.00 6.00a 6.00ax 7.00