BUG: F4999 from Item Not in COMMON Initialized in Block Data (77902)



The information in this article applies to:

  • Microsoft FORTRAN Compiler for MS-DOS 5.1
  • Microsoft FORTRAN compiler for OS/2 5.1
  • Microsoft FORTRAN PowerStation for MS-DOS 1.0
  • Microsoft FORTRAN PowerStation for MS-DOS 5.0
  • Microsoft Fortran Powerstation 32 for Windows NT 1.0
  • Microsoft Fortran Powerstation 32 for Windows NT 4.0

This article was previously published under Q77902

SYMPTOMS

The following error message is generated when compiling a FORTRAN program which initializes a variable within a Block Data subprogram, but the variable is not contained in a COMMON block:

Under Fortran Powerstation 32 1.0
warning F4999: variable declared but not used
Under Fortran PowerStation 4.0
warning FOR4280: unused local variable

RESOLUTION

To eliminate the warning, put the variable in a COMMON block.

STATUS

Microsoft has confirmed this to be a bug in the products listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The following code will produce the F4999 error message with the COMMON block commented out:
      block data

C      common /tst/ i

      data i /1/ 
      end

      program test
      common /tst/ i
      write(*,*) i
      end
				

Modification Type:MajorLast Reviewed:12/1/2003
Keywords:kberrmsg kbLangFortran KB77902