BUG: File Time Incorrect After Saving During Build

Last reviewed: July 31, 1997
Article ID: Q139476
The information in this article applies to:
  • Microsoft Visual C++, 32-bit Edition, versions 4.0, 4.1, 4.2, 5.0
  • Microsoft FORTRAN PowerStation 32 for Windows NT, version 4.0

SYMPTOMS

If a source file is saved while the project is being built, the relationships between the source file and the .obj file may be incorrect. The saved source file may have an earlier date than the .obj file that was created from the previous version of the source file.

CAUSE

The problem of file modify or save time being incorrect is caused by the Developer's Studio doing front-end processing on all the files before it creates the .obj files. This makes it possible to save a changed file after the earlier version was processed but before the .obj file is created.

STATUS

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

MORE INFORMATION

Steps to Reproduce Problem

  1. Open one of the files in a project, but don't open the file that will be used to create a .pch file (Stdafx.cpp in an MFC application).

  2. Start a Rebuild All.

  3. Introduce a syntax error in the open file, but do not save it.

  4. While the Rebuild All progresses, look in the output window, and wait for it to compile the open file.

  5. As soon as it finishes compiling the file, and before it says "Generating Code," save the changed file that has a syntax error. Because the changes occurred after the front end of the compiler has processed the file, there will be no errors in the build. The .obj file will however have a later date because it was created in the "Generating Code" phase.

  6. Do a Build (not a Rebuild All). Nothing will happen, and the changed file will not be compiled.

  7. Look at the dates of the files, and confirm that the .obj file is newer than the file that was changed.


Additional query words: utilities
Keywords : vcbuglist400 vcbuglist500 VwbIss
Version : 4.0 4.1 4.2 5.0
Platform : NT WINDOWS
Issue type : kbbug


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 31, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.