summaryrefslogtreecommitdiffstats
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-28 21:45:02 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-28 21:45:02 +0000
commit45aa4a519626ccfd084760e47f86d654a69bd754 (patch)
treeed8035556cbbe82211a22a58d3beaeef00e865d0 /gcc/cpplib.c
parent6aae6e10ad921dbe4d034777dd9f37043e23bea3 (diff)
downloadppe42-gcc-45aa4a519626ccfd084760e47f86d654a69bd754.tar.gz
ppe42-gcc-45aa4a519626ccfd084760e47f86d654a69bd754.zip
2000-03-28 Zack Weinberg <zack@wolery.cumb.org>
* cppfiles.c (hash_IHASH): Just return i->hash. (cpp_included): Set dummy.hash using _cpp_calc_hash. Use htab_find_with_hash. (cpp_read_file): Likewise. (find_include_file): Likewise. Properly initialize ih->nshort. Share ih->name and ih->nshort if possible. * cpphash.c (_cpp_calc_hash): New function. (hash_HASHNODE): Just return h->hash. (_cpp_lookup): Set dummy.hash using _cpp_calc_hash. Use htab_find_with_hash. * cpphash.h: Prototype _cpp_calc_hash. * cppinit.c (initialize_builtins): Provide a valid hash to _cpp_make_hashnode, using _cpp_calc_hash. * cpphash.c (collect_expansion): # is not a special character in object-like macros. In -traditional mode, /**/ is not token paste at the beginning or end of the line. * cpplib.c (do_include, do_import, do_include_next): If parse_include fails, return immediately. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32792 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index dac186d9904..88433f829c9 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -508,6 +508,8 @@ do_include (pfile)
char *token;
len = parse_include (pfile, dtable[T_INCLUDE].name);
+ if (len == 0)
+ return 0;
token = alloca (len + 1);
strcpy (token, CPP_PWRITTEN (pfile));
@@ -537,6 +539,8 @@ do_import (pfile)
}
len = parse_include (pfile, dtable[T_IMPORT].name);
+ if (len == 0)
+ return 0;
token = alloca (len + 1);
strcpy (token, CPP_PWRITTEN (pfile));
@@ -559,7 +563,8 @@ do_include_next (pfile)
cpp_pedwarn (pfile, "ANSI C does not allow `#include_next'");
len = parse_include (pfile, dtable[T_INCLUDE_NEXT].name);
-
+ if (len == 0)
+ return 0;
token = alloca (len + 1);
strcpy (token, CPP_PWRITTEN (pfile));
OpenPOWER on IntegriCloud