summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/cppinit.c2
-rw-r--r--gcc/cpplib.h2
-rw-r--r--gcc/cppmacro.c5
-rw-r--r--gcc/cppmain.c2
5 files changed, 15 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 18b1d1519e5..4855894581a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2000-11-28 Neil Booth <neilb@earthling.net>
+
+ * cppmacro.c (cpp_scan_buffer_nooutput): Take a boolean
+ indicating whether to scan all buffers on the stack or
+ just one.
+ * cppinit.c (do_includes): Update.
+ * cppmain.c (main): Update.
+ * cpplib.h: Update prototype.
+
2000-11-28 Richard Henderson <rth@redhat.com>
* genoutput.c (validate_insn_operands): New.
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 39e1562c936..a91a6d10414 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -931,7 +931,7 @@ do_includes (pfile, p, scan)
/* Later: maybe update this to use the #include "" search path
if cpp_read_file fails. */
if (cpp_read_file (pfile, p->arg) && scan)
- cpp_scan_buffer_nooutput (pfile);
+ cpp_scan_buffer_nooutput (pfile, 0);
q = p->next;
free (p);
p = q;
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index 3732556e3f3..9f2961ab07b 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -777,7 +777,7 @@ extern void cpp_forall_identifiers PARAMS ((cpp_reader *,
void *));
/* In cppmacro.c */
-extern void cpp_scan_buffer_nooutput PARAMS ((cpp_reader *));
+extern void cpp_scan_buffer_nooutput PARAMS ((cpp_reader *, int));
extern void cpp_start_lookahead PARAMS ((cpp_reader *));
extern void cpp_stop_lookahead PARAMS ((cpp_reader *, int));
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index f9291bcdc40..637e5e95536 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -990,11 +990,12 @@ cpp_get_token (pfile, token)
/* Read each token in, until EOF. Directives are transparently
processed. */
void
-cpp_scan_buffer_nooutput (pfile)
+cpp_scan_buffer_nooutput (pfile, all_buffers)
cpp_reader *pfile;
+ int all_buffers;
{
- cpp_buffer *buffer = pfile->buffer->prev;
cpp_token token;
+ cpp_buffer *buffer = all_buffers ? 0: pfile->buffer->prev;
do
do
diff --git a/gcc/cppmain.c b/gcc/cppmain.c
index 8b15f65d0b3..cc958e00403 100644
--- a/gcc/cppmain.c
+++ b/gcc/cppmain.c
@@ -95,7 +95,7 @@ main (argc, argv)
if (CPP_BUFFER (pfile))
{
if (CPP_OPTION (pfile, no_output))
- cpp_scan_buffer_nooutput (pfile);
+ cpp_scan_buffer_nooutput (pfile, 1);
else
scan_buffer (pfile);
}