preprocessor/8190: Failed compilation deletes -MD dependency file
Thu Oct 10 13:06:00 GMT 2002

>Number:         8190
>Category:       preprocessor
>Synopsis:       Failed compilation deletes -MD dependency file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 10 13:06:00 PDT 2002
>Release:        gcc version 3.2.1 20020920 (prerelease)
powerpc64-linux cross-compiler from AIX and x86-linux
If one compiles a source file using the -MD option to create
a ".d" dependency file and specifies an output file, then if the source file contains an error, gcc-3.2 will delete the dependency .d file and leave the .o object file. Once the failure is corrected, Make may no longer have the complete dependency information to recognize that the object file needs to be rebuilt.  Gcc-2.95 did not delete
the dependency file upon compilation failure.
gcc -c -MD foo.C -o foo.o


More information about the Gcc-bugs mailing list