public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* -MM -MG, <foo.h>, and 3.4.0
@ 2004-04-28  7:41 Paul Jarc
  2004-04-30  2:01 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Jarc @ 2004-04-28  7:41 UTC (permalink / raw)
  To: gcc

$ cat foo.c
#include <foo.h>
#include "bar.h"

$ gcc-3.2.3/bin/gcc -E -MM -MG foo.c 2> /dev/null
foo.o: foo.c bar.h

$ gcc-3.3.3/bin/gcc -E -MM -MG foo.c
foo.o: foo.c bar.h

$ gcc-3.4.0/bin/gcc -E -MM -MG foo.c
foo.o: foo.c foo.h bar.h

Is this intentional?  It doesn't seem right - #include <foo.h> won't
look in the source directory during actual compilation, but -MM -MG
seems to indicate that it would.  Is there any way to evoke the old
behavior?


paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: -MM -MG, <foo.h>, and 3.4.0
  2004-04-28  7:41 -MM -MG, <foo.h>, and 3.4.0 Paul Jarc
@ 2004-04-30  2:01 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 2004-04-30  2:01 UTC (permalink / raw)
  To: Paul Jarc; +Cc: gcc

Paul Jarc wrote:
> $ cat foo.c
> #include <foo.h>
> #include "bar.h"
> $ gcc-3.4.0/bin/gcc -E -MM -MG foo.c
 > foo.o: foo.c foo.h bar.h

This looks like an unintentional side-effect of
   http://gcc.gnu.org/ml/gcc-patches/2003-07/msg02780.html
which completely rewrote the cpp file handling to fix #import, #pragma 
once and a number of other problems.

I think cpp_stack_include has to pass angle_brackets to cpp_find_file, 
which then passes it on to open_file_failed, which then tests it like 
gcc-3.3.x and earlier did.

I'd suggest filing a bug report so this doesn't get lost or forgotten.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-29 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-28  7:41 -MM -MG, <foo.h>, and 3.4.0 Paul Jarc
2004-04-30  2:01 ` Jim Wilson

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).