c/9743: -MF only writes the info from the very last of multiple C files.

rayvt@comm.mot.com rayvt@comm.mot.com
Tue Feb 18 14:26:00 GMT 2003


>Number:         9743
>Category:       c
>Synopsis:       -MF only writes the info from the very last of multiple C files.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 18 14:26:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Ray Van Tassle
>Release:        3.2.2 & 3.2.1
>Organization:
>Environment:
Reading specs from /users/rayvt/local/gcc322/lib/gcc-lib/sparc-sun-solaris2.6/3.2.2/specs
Configured with: ../configure --prefix=/users/rayvt/local/gcc322
Thread model: posix
gcc version 3.2.2
>Description:
If you do "gcc -MG -MM -MF deps.mk file1.c file2.c file3.c" 
Then only the info for the last file (file3.c) is put in the output file (deps.mk).   But if you do ">deps.mk" instead of "-MF", the info for all the files (1 & 2 & c) is there.

It looks like maybe the file named by "-MF" is re-opened for write for each of the processed source files, and is therefore overwritten by each one.
>How-To-Repeat:
> gcc -MG -MM -MF deps.mk ../src/ip_inbound.c ../src/ip_mobile_info.c ../src/cfg_layer.c 
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list