diff options
author | kan <kan@FreeBSD.org> | 2006-08-26 21:29:10 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2006-08-26 21:29:10 +0000 |
commit | ab6c6e434e4ca0bf593007d49dee6eceb73286c0 (patch) | |
tree | 843ffc6140f66bf60562adb1bf8d3d82b9739b5e /contrib/gcc/cppinit.c | |
parent | 8a6911d2bb988a943624cbf4e4041b827d9ade53 (diff) | |
download | FreeBSD-src-ab6c6e434e4ca0bf593007d49dee6eceb73286c0.zip FreeBSD-src-ab6c6e434e4ca0bf593007d49dee6eceb73286c0.tar.gz |
Gcc 3.4.6 as of 2006/08/25 #116475.
Diffstat (limited to 'contrib/gcc/cppinit.c')
-rw-r--r-- | contrib/gcc/cppinit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/gcc/cppinit.c b/contrib/gcc/cppinit.c index ae30568..647fbbf 100644 --- a/contrib/gcc/cppinit.c +++ b/contrib/gcc/cppinit.c @@ -466,7 +466,7 @@ cpp_read_main_file (cpp_reader *pfile, const char *fname) } pfile->main_file - = _cpp_find_file (pfile, fname, &pfile->no_search_path, false); + = _cpp_find_file (pfile, fname, &pfile->no_search_path, false, 0); if (_cpp_find_failed (pfile->main_file)) return NULL; @@ -477,6 +477,8 @@ cpp_read_main_file (cpp_reader *pfile, const char *fname) if (CPP_OPTION (pfile, preprocessed)) { read_original_filename (pfile); + if (!pfile->map) + return NULL; fname = pfile->map->to_file; } return fname; @@ -496,8 +498,10 @@ read_original_filename (cpp_reader *pfile) token = _cpp_lex_direct (pfile); if (token->type == CPP_HASH) { + pfile->state.in_directive = 1; token1 = _cpp_lex_direct (pfile); _cpp_backup_tokens (pfile, 1); + pfile->state.in_directive = 0; /* If it's a #line directive, handle it. */ if (token1->type == CPP_NUMBER) |