This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/24732] New: Invalid location of depency files generated with -MD and -MMD


+++ This bug was initially created as a clone of Bug #215 +++

When compiling and generating dependencies (using -MD or
-MMD): and using option -o with a relative or absolute path
for the resulting object file, the rule generated should
reflect the correct location of the .o file

Instead, the dependency file appears in the current directory.

But, if the preprocessing fails the dependency file (although empty) remains in
the right place.

How to repeat:

echo "#include" > test.c
gcc -MD -o /tmp/test.o -c test.c
ls -l /tmp/test.d
cat /tmp/test.d

echo "#include <stdio.h>" > test.c
gcc -MD -o /tmp/test.o -c test.c
ls -l /tmp/test.d ./test.d

cat /tmp/test.d
cat ./test.d


-- 
           Summary: Invalid location of depency files generated with -MD and
                    -MMD
           Product: gcc
           Version: 3.3.6
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: maslowski73 at wp dot pl


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24732


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]