From 5d83f44baa49fbeadb9b5c35cb15e3f8a860802f Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 4 Aug 1999 20:39:33 +0000 Subject: cpphash.c (macroexpand): Delete leading whitespace when arg is concatenated before. Wed Aug 4 13:29:23 1999 Zack Weinberg * cpphash.c (macroexpand): Delete leading whitespace when arg is concatenated before. (unsafe_chars): Correct test for whether + and - can extend a token. * cppinit.c (cpp_start_read): Do dependencies for -include/-imacros files also. * cpplib.c (cpp_scan_buffer): In no-output mode, don't bother tokenizing non-directive lines. (cpp_expand_to_buffer): Temporarily disable no-output mode. * cppmain.c: In no-output mode, just call cpp_scan_buffer for the input file. From-SVN: r28512 --- gcc/cppinit.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'gcc/cppinit.c') diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 7269c56..c9f7ece 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -1029,8 +1029,15 @@ cpp_start_read (pfile, fname) ih_fake->control_macro = 0; ih_fake->buf = (char *)-1; ih_fake->limit = 0; - if (!finclude (pfile, fd, ih_fake)) - cpp_scan_buffer (pfile); + if (finclude (pfile, fd, ih_fake)) + { + if (CPP_PRINT_DEPS (pfile)) + deps_output (pfile, ih_fake->name, ' '); + + cpp_scan_buffer (pfile); + } + else + cpp_pop_buffer (pfile); free (ih_fake); q = p->next; @@ -1062,8 +1069,14 @@ cpp_start_read (pfile, fname) ih_fake->buf = (char *)-1; ih_fake->limit = 0; if (finclude (pfile, fd, ih_fake)) - output_line_command (pfile, enter_file); - + { + if (CPP_PRINT_DEPS (pfile)) + deps_output (pfile, ih_fake->name, ' '); + + output_line_command (pfile, enter_file); + } + else + cpp_pop_buffer (pfile); q = p->next; free (p); p = q; -- cgit v1.1