aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2000-08-24 22:18:53 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-08-24 22:18:53 +0000
commit3d7428b8f616cb0cd457fd7cf32e1488ff6cd2de (patch)
treefe6b0cdf3051a34daedec0a598101da8fc79bd04 /gcc/cppfiles.c
parentcc914f8cbf08651475d06920039616636173b75c (diff)
downloadgcc-3d7428b8f616cb0cd457fd7cf32e1488ff6cd2de.zip
gcc-3d7428b8f616cb0cd457fd7cf32e1488ff6cd2de.tar.gz
gcc-3d7428b8f616cb0cd457fd7cf32e1488ff6cd2de.tar.bz2
*** empty log message ***
From-SVN: r35960
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index 2078989..6bd4af4 100644
--- a/gcc/cppfiles.c
+++ b/gcc/cppfiles.c
@@ -616,7 +616,10 @@ read_include_file (pfile, inc)
if (fd < 0 || fstat (fd, &st) < 0)
goto perror_fail;
+ /* These must be set right away. */
inc->date = st.st_mtime;
+ fp->inc = inc;
+ fp->nominal_fname = inc->name;
/* If fd points to a plain file, we might be able to mmap it; we can
definitely allocate the buffer all at once. If fd is a pipe or
@@ -673,11 +676,6 @@ read_include_file (pfile, inc)
goto perror_fail;
}
- /* These must be set before prescan. */
- fp->inc = inc;
- fp->nominal_fname = inc->name;
- pfile->include_depth++;
-
if (length == 0)
inc->cmacro = NEVER_REREAD;
@@ -691,6 +689,7 @@ read_include_file (pfile, inc)
if (!CPP_OPTION (pfile, ignore_srcdir))
fp->actual_dir = actual_directory (pfile, inc->name);
+ pfile->include_depth++;
pfile->input_stack_listing_current = 0;
if (pfile->cb.enter_file)
(*pfile->cb.enter_file) (pfile);