BUG: Compiler Errors in INCLUDE Files Not in Listing File

Last reviewed: July 6, 1995
Article ID: Q67167
The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 5.0 and 5.1
  • Microsoft FORTRAN for OS/2, versions 5.0 and 5.1

SYMPTOMS

When a compiler error occurs in an INCLUDE file, the compiler error messages do not appear in the source listing file generated by the Microsoft FORTRAN version 5.0 or 5.1 compiler. However, the total number of detected errors tallied at the end of the listing file is correct.

NOTE: Source listings are not supported in FORTRAN PowerStation.

STATUS

Microsoft has confirmed this to be a problem in FORTRAN versions 5.0 and 5.1.

MORE INFORMATION

When the FL command is issued with the /Fs option, a source listing file is created that should contain any compiler errors next to the line of source code that generated the error. The errors are also sent to the screen and subsequently to the M editor, if compilation is being done from within the editor. If a compiler error is generated on a source line in an INCLUDE file, the error is correctly flagged on output to the screen and consequently to the editor, but not correctly inserted into the source listing file.

In the following code, the INCLUDE file has one error (which is not flagged in the listing file), and the program source file has one error to demonstrate how the listing file should flag errors.

Source file (myprg.for):

      program main
      include 'test'
      write(*,*) 'This is a test'
      writ(*,*) 'This is also a bad line'
      end

Include file (test):

      writ(*,*) 'This is a bad line'

List file:

PAGE 1

11-14-90

03:09:12

 Line#  Source Line          Microsoft FORTRAN Optimizing Compiler
Version 5.00

     1        program main
     2        include 'test'
      ***** Begin listing of: test
     1        writ(*,*) 'This is a bad line'
      ***** End listing of: test
     3        write(*,*) 'This is a test'
     4        writ(*,*) 'This is also a bad line'
***** myprg.for(4) : error F2115: syntax error
     5        end

2 errors detected


Additional reference words: 5.00 5.10
KBCategory: kbtool kbbuglist
KBSubcategory: FLIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 6, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.