diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-01-13 18:39:26 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-01-13 18:39:26 +0000 |
commit | d6d52dd655506899ea8ddbb5a18c0df16a45f3f9 (patch) | |
tree | 842229d5e9effcad193597ab41fcfb2eb4a902bc /gcc/cpplib.c | |
parent | ccd96f0ad82a526127150a8d254fbf70f3c93030 (diff) | |
download | gcc-d6d52dd655506899ea8ddbb5a18c0df16a45f3f9.zip gcc-d6d52dd655506899ea8ddbb5a18c0df16a45f3f9.tar.gz gcc-d6d52dd655506899ea8ddbb5a18c0df16a45f3f9.tar.bz2 |
cppfiles.c (_cpp_fake_include): New function.
* 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.
From-SVN: r38987
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 2064120..78045e3 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) |