Bug 19361 - -MT option does not escape funny characters
Summary: -MT option does not escape funny characters
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: preprocessor (show other bugs)
Version: 3.4.3
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-10 14:16 UTC by abbott
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i486-slackware-linux
Target: i486-slackware-linux
Build: i486-slackware-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description abbott 2005-01-10 14:16:52 UTC
The -MT option really does use precisely the specified string as the target. 
It would be better if spaces (and other funny characters) were 
escaped (using backslash) in the output. 
 
Note: for my purposes it would be enough to follow the proposal in 
bug #15185 that there be an option to force the full path name in 
the target. 
 
EXAMPLE: compare the outputs of the following two calls to gcc 
$ touch my\ prog.c 
$ gcc -MM my\ prog.c 
my\ prog.o: my\ prog.c 
$ gcc -MM my\ prog.c -MT my\ prog.o 
my prog.o: my\ prog.c 
 
I am inclined to say that the second output is wrong.
Comment 1 Neil Booth 2005-01-10 15:01:28 UTC
Subject: Re:  New: -MT option does not escape funny characters

abbott at dima dot unige dot it wrote:-

> The -MT option really does use precisely the specified string as the target. 
> It would be better if spaces (and other funny characters) were 
> escaped (using backslash) in the output. 
>  
> Note: for my purposes it would be enough to follow the proposal in 
> bug #15185 that there be an option to force the full path name in 
> the target. 
>  
> EXAMPLE: compare the outputs of the following two calls to gcc 
> $ touch my\ prog.c 
> $ gcc -MM my\ prog.c 
> my\ prog.o: my\ prog.c 
> $ gcc -MM my\ prog.c -MT my\ prog.o 
> my prog.o: my\ prog.c 
>  
> I am inclined to say that the second output is wrong.

What's wrong with -MQ?
Comment 2 abbott@bigatti.dima.unige.it 2005-01-10 15:40:10 UTC
Subject: Re:  -MT option does not escape funny
 characters


> What's wrong with -MQ?

Thank you.  I'm at a loss for words: I must be suffering from selective blindness

John.
PS now I wonder why -MT exists at all.

Comment 3 Andrew Pinski 2005-01-10 15:41:58 UTC
Invalid as explained to use -MQ.