This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc -M bug.
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: gcc -M bug.
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Mon, 17 Jul 2000 13:11:29 -0700
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <20000717125223.A3353@valinux.com>
On Mon, Jul 17, 2000 at 12:52:23PM -0700, H . J . Lu wrote:
> Now with gcc -M,
>
> # /work/build/gnu/bin/gcc-3.0-libstdc++v3/gcc/xgcc -B/work/build/gnu/bin/gcc-3.0-libstdc++v3/gcc/ -M -I. -ansi -pedantic-errors t.cc
> # 1 "t.cc"
> #pragma weak foo
> # 1 "t.cc"
>
>
> # 3 "t.h" 1 3
> # 33 "/work/build/gnu/bin/gcc-3.0-libstdc++v3/gcc/include/exception" 1 3
> #pragma interface "exception"
> # 33 "/work/build/gnu/bin/gcc-3.0-libstdc++v3/gcc/include/exception" 3
> t.o: t.cc t.h \
> /work/build/gnu/bin/gcc-3.0-libstdc++v3/gcc/include/exception
>
> Has the meaning of -M been changed? Why those extra stuff?
That's a bug - a harmless one, since # is Make's comment character,
but still.
Please try this patch.
zw
===================================================================
Index: cpplex.c
--- cpplex.c 2000/07/16 13:35:23 1.76
+++ cpplex.c 2000/07/17 20:09:41
@@ -326,7 +326,7 @@ output_line_command (pfile, print, line)
putc ('\n', print->outf);
pfile->need_newline = 0;
- if (CPP_OPTION (pfile, no_line_commands))
+ if (CPP_OPTION (pfile, no_line_commands) || CPP_OPTION (pfile, no_output))
return;
/* If ip is null, we've been called from cpp_finish, and they just