Bug 37697 - -MD flag can't be used when the output file hasn't got a '.' in the name
-MD flag can't be used when the output file hasn't got a '.' in the name
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-25 17:50 EDT by Need Real Name
Modified: 2007-04-18 12:32 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-26 06:33:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-04-25 17:50:05 EDT
Compiling a program with the -MD flag fails when the output file
hasn't got a '.' in the name. This bug can be reproduced as follows
$ echo "int main(){}" > hello.c
$ gcc -MD hello.c -o hello
cpp0: Too many filenames. Type cpp0 --help for usage info
$ gcc -MD hello.c -o hello.hello
(Succeeds.)
Comment 1 Mike Pope 2001-04-26 02:55:59 EDT
I have seen this too, with the -MMD flag, but only in association with -o.  Here
is my test case:

170> ls -la foo*
-rw-------    1 mpope    users           7 Apr 25 22:50 foo.c
171> cat foo.c
int a;
172> gcc -c -MMD foo.c
173> ls -la foo*
-rw-------    1 mpope    users           7 Apr 25 22:50 foo.c
-rw-------    1 mpope    users          13 Apr 25 22:59 foo.d
-rw-------    1 mpope    users         716 Apr 25 22:59 foo.o
174> rm foo.d foo.o
175> gcc -o foo -MMD foo.c
cpp0: Too many filenames. Type cpp0 --help for usage info
176> ls -la foo*
-rw-------    1 mpope    users           7 Apr 25 22:50 foo.c
Comment 2 Jakub Jelinek 2001-04-26 06:33:30 EDT
Fixed in http://gcc.gnu.org/ml/gcc-patches/2001-04/msg01272.html
The patch will make it into 2.96-82.

Note You need to log in before you can comment on or make changes to this bug.