Bug 9653: error when using -MT "string1 string2"

Ian Wienand ianw@gelato.unsw.edu.au
Wed Feb 12 04:45:00 GMT 2003


I have additional information for this bug and I believe it thus gets
posted here.

The -MT command line switch with gcc version 3.3 20030129 behaves incorrectly.

A test case :

echo "int main(void) { }" | gcc-snap -S -o - -x c - -MD -MF test.out -MT "foo bar"

fails with 

gcc: cannot specify -o with -c or -S and multiple compilations

gcc 3.2 parses the line correctly, and if you split the -MT up into
two -MT's (e.g. -MT "foo" -MT "bar") it also works on either version.

However, I believe 3.3 should parse it correctly, as it says in the

"If you want multiple targets, you can specify them as a single
argument to -MT, or use multiple -MT options."



More information about the Gcc-bugs mailing list