preprocessor/5899: -M disables -dM

Neil Booth neil@daikokuya.demon.co.uk
Sat Mar 9 13:08:00 GMT 2002


Andreas Schwab wrote:-

> glibc uses the equivalent functionality provided by SUNPRO_DEPENDENCIES:

Ah, OK.  Would you confirm this works for you?  If so, I'll send a
formal patch and explicitly document this behaviour.

Neil.


Index: cppinit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cppinit.c,v
retrieving revision 1.202
diff -u -p -r1.202 cppinit.c
--- cppinit.c	2002/02/23 13:42:40	1.202
+++ cppinit.c	2002/03/09 21:06:21
@@ -1886,11 +1886,9 @@ init_dependency_output (pfile)
        with -o.  out_fname is non-NULL here.  */
     CPP_OPTION (pfile, deps_file) = CPP_OPTION (pfile, out_fname);
 
-  /* When doing dependencies, we should suppress all output, including
-     -dM, -dI etc.  */
+  /* When doing dependencies, suppress normal preprocessed output.
+     Still do -dM, -dI etc. as e.g. glibc depends on this.  */
   CPP_OPTION (pfile, no_output) = 1;
-  CPP_OPTION (pfile, dump_macros) = 0;
-  CPP_OPTION (pfile, dump_includes) = 0;
 }
 
 /* Handle --help output.  */



More information about the Gcc-bugs mailing list