aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2000-07-02 10:56:57 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2000-07-02 10:56:57 +0200
commitfb753f88e9ae5a80d1499596821d3b09fd09cc7c (patch)
treee1e29855a5797315304e8491a4cfdf4286a2a7d9 /gcc/cppfiles.c
parent970d6386ebf7ea8f38b5f07623851e2f05ae5b2c (diff)
downloadgcc-fb753f88e9ae5a80d1499596821d3b09fd09cc7c.zip
gcc-fb753f88e9ae5a80d1499596821d3b09fd09cc7c.tar.gz
gcc-fb753f88e9ae5a80d1499596821d3b09fd09cc7c.tar.bz2
cpplib.h (struct cpp_reader): New field include_depth.
* cpplib.h (struct cpp_reader): New field include_depth. (struct cpp_printer): Rename last_bsd to last_id. * cppfiles.c (read_include_file): Bump include_depth. * cpplex.c (cpp_pop_buffer): Decrement include_depth. (output_line_command): Output correct #line if a header is including itself and is not protected against multiple inclusion. Use include_depth instead of buffer_stack_depth, last_id instead of last_bsd. * cppinit.c (cpp_start_read): Initialize last_id instead of last_bsd. From-SVN: r34831
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index 4e14aae..4def8ed 100644
--- a/gcc/cppfiles.c
+++ b/gcc/cppfiles.c
@@ -618,6 +618,7 @@ read_include_file (pfile, inc)
/* These must be set before prescan. */
fp->inc = inc;
fp->nominal_fname = inc->name;
+ pfile->include_depth++;
if (length == 0)
inc->cmacro = NEVER_REREAD;