summaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-13 18:39:26 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-13 18:39:26 +0000
commitd1d8b2705539651a1fd21280447dffac8ad3d75c (patch)
tree842229d5e9effcad193597ab41fcfb2eb4a902bc /gcc/cpplib.c
parentda8259547a775962819dfd6c8be9d78878caa81b (diff)
downloadgcc-d1d8b2705539651a1fd21280447dffac8ad3d75c.tar.gz
* cppfiles.c (_cpp_fake_include): New function.
* cpphash.h (_cpp_fake_include): New. * cpplib.c (do_line): Call _cpp_fake_include when entering header files in preprocessed input. * cppmain.c (cb_pragma_implementation): Remove handling. (setup_callbacks): Don't register pragmas. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38987 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 20641200ec9..78045e31fc3 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -1,6 +1,6 @@
/* CPP Library. (Directive handling.)
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -716,6 +716,7 @@ do_line (pfile)
_cpp_simplify_pathname (fname);
+ /* Only accept flags for the # 55 form. */
if (! pfile->state.line_extension)
check_eol (pfile);
else
@@ -743,7 +744,10 @@ do_line (pfile)
if (reason == FC_ENTER)
{
+ /* Fake a buffer stack for diagnostics. */
cpp_push_buffer (pfile, 0, 0, BUF_FAKE, fname);
+ /* Fake an include for cpp_included. */
+ _cpp_fake_include (pfile, fname);
buffer = pfile->buffer;
}
else if (reason == FC_LEAVE)