public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14934] New: the assumed dependency target isn't always right
@ 2004-04-13 4:24 dfries at mail dot win dot org
2004-04-13 8:23 ` [Bug preprocessor/14934] " pinskia at gcc dot gnu dot org
2004-04-13 10:10 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 5+ messages in thread
From: dfries at mail dot win dot org @ 2004-04-13 4:24 UTC (permalink / raw)
To: gcc-bugs
SpacedOut:/tmp/test$ gcc -MMD headers.h
SpacedOut:/tmp/test$ cat headers.d
headers.o: headers.h
SpacedOut:/tmp/test$ gcc -MMD main.c
SpacedOut:/tmp/test$ cat main.d
main.o: main.c
The correct output would be,
headers.h.gch: headers.h
a.out: main.c headers.h.gch
While a.out might be arguable strace
strace -o /tmp/gcc_output -e file -f -F gcc -MMD main.c
shows that main.o was never created so it really can't be the right
target file.
The function deps_add_default_target in gcc/mkdeps.c adds .o to the
basename of whatever file that is being compiled. Perhaps the section
of the compiler that generates the final output file should be where
the target is specified.
SpacedOut:/tmp/test$ gcc -v
Reading specs from /home/david/WorkProjects/OpenSceneGraph/DevelGcc/install/lib/gcc/i686-pc-linux-gnu/3.5.0/specs
Configured with: ../gcc_src/configure --enable-languages=c++ --prefix=/home/david/WorkProjects/OpenSceneGraph/DevelGcc/install
--exec-prefix=/home/david/WorkProjects/OpenSceneGraph/DevelGcc/install
Thread model: posix
gcc version 3.5.0 20040412 (experimental)
header.h:
#ifndef _HEADERS_H
#define _HEADERS_H 1
const int value=32;
#endif /* _HEADERS_H */
main.c:
#include "headers.h"
int main(int argc, char ** argv)
{
return value;
}
--
Summary: the assumed dependency target isn't always right
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dfries at mail dot win dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-linux
GCC host triplet: i386-linux
GCC target triplet: i386-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14934
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/14934] the assumed dependency target isn't always right
2004-04-13 4:24 [Bug c/14934] New: the assumed dependency target isn't always right dfries at mail dot win dot org
@ 2004-04-13 8:23 ` pinskia at gcc dot gnu dot org
2004-04-13 10:10 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-13 8:23 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c |preprocessor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14934
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/14934] the assumed dependency target isn't always right
2004-04-13 4:24 [Bug c/14934] New: the assumed dependency target isn't always right dfries at mail dot win dot org
2004-04-13 8:23 ` [Bug preprocessor/14934] " pinskia at gcc dot gnu dot org
@ 2004-04-13 10:10 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-13 10:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-13 04:27 -------
*** Bug 14935 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14934
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/14934] the assumed dependency target isn't always right
[not found] <bug-14934-8321@http.gcc.gnu.org/bugzilla/>
2006-12-26 0:33 ` tromey at gcc dot gnu dot org
@ 2007-02-09 0:57 ` tromey at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-02-09 0:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tromey at gcc dot gnu dot org 2007-02-09 00:57 -------
I've thought about this more and I think that closing it
is best. Please reopen (with a reason :-) if you disagree.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14934
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/14934] the assumed dependency target isn't always right
[not found] <bug-14934-8321@http.gcc.gnu.org/bugzilla/>
@ 2006-12-26 0:33 ` tromey at gcc dot gnu dot org
2007-02-09 0:57 ` tromey at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-12-26 0:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tromey at gcc dot gnu dot org 2006-12-26 00:33 -------
This is a bit weird but it is the documented behavior of -MMD.
To get a different target you must use -MT or -MQ.
My first reaction is that changing this may be unfriendly
(we don't know who, if anyone, is relying on the current behavior);
and as it follows the documentation and is also easily worked
around, we should mark this "not a bug".
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-12-26 00:33:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14934
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-02-09 0:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-13 4:24 [Bug c/14934] New: the assumed dependency target isn't always right dfries at mail dot win dot org
2004-04-13 8:23 ` [Bug preprocessor/14934] " pinskia at gcc dot gnu dot org
2004-04-13 10:10 ` pinskia at gcc dot gnu dot org
[not found] <bug-14934-8321@http.gcc.gnu.org/bugzilla/>
2006-12-26 0:33 ` tromey at gcc dot gnu dot org
2007-02-09 0:57 ` tromey at gcc dot gnu dot org
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).