public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/31851]  New: -MT doesn't overwrite the default target when used with -M(M)D and -o
@ 2007-05-07  7:43 c dot matuszewski at gmx dot de
  0 siblings, 0 replies; only message in thread
From: c dot matuszewski at gmx dot de @ 2007-05-07  7:43 UTC (permalink / raw)
  To: gcc-bugs

Suppose, you have the following C-File (input.c), empty.h is just an empty
file:

#include "empty.h"
void dummy(void) {
}

Issue the command:
gcc -c input.c -MD -MT foo.o -o input.o

The content of input.d is:
foo.o input.o: input.c empty.h

but I would expect:
foo.o: input.c empty.h
which also is the output of "gcc -c input.c -MD -MT foo.o"

The documentation says:
-MD: [...] if used without `-E', each `-o' is understood to specify a target
object file.

OK, but:
-MT: [...] An `-MT' option will set the target to be exactly the string you
specify.

I would prefer that -MT always overwrites the targets (as it does with -M and
-MM).

I tested also with gcc 3.4.4 and 3.4.6 and the behaviour is the same as with
4.1.1


-- 
           Summary: -MT doesn't overwrite the default target when used with
                    -M(M)D and -o
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: c dot matuszewski at gmx dot de


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-07  7:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-07  7:43 [Bug preprocessor/31851] New: -MT doesn't overwrite the default target when used with -M(M)D and -o c dot matuszewski at gmx dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).