diff options
| author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-11 00:05:11 +0000 |
|---|---|---|
| committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-11 00:05:11 +0000 |
| commit | 50720dba3f1860e118c1b4b030a06f71f5e800d0 (patch) | |
| tree | 2f9de21a1e1e04335878526769ff5fd361b7abd4 /gcc/cpplib.c | |
| parent | 053ec0a10583ccc6b8090c98aaef7529ea450e78 (diff) | |
| download | ppe42-gcc-50720dba3f1860e118c1b4b030a06f71f5e800d0.tar.gz ppe42-gcc-50720dba3f1860e118c1b4b030a06f71f5e800d0.zip | |
* cppexp.c: When forcing unsigned comparisons, cast both sides
of the operation.
* cpphash.h: Move static declaration of hashtab[]...
* cpphash.c: ...here.
* cpplib.c: Cast difference of two pointers to size_t before
comparing it to size_t. Cast signed to unsigned
before comparing to size_t. (FIXME: struct argdata should use
unsigned buffer sizes.)
* cpplib.h (struct cpp_reader): Declare token_buffer_size as
unsigned int. (CPP_WRITTEN): Cast return value to size_t.
(CPP_RESERVE): Parenthesize N for evaluation order, cast to
size_t before comparison.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22980 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
| -rw-r--r-- | gcc/cpplib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index da2f54a97f0..b56790ec32b 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -1512,7 +1512,7 @@ create_definition (buf, limit, pfile, predefinition) while (is_idchar[*bp]) { bp++; /* do we have a "special" rest-args extension here? */ - if (limit - bp > REST_EXTENSION_LENGTH + if ((size_t)(limit - bp) > REST_EXTENSION_LENGTH && strncmp (rest_extension, bp, REST_EXTENSION_LENGTH) == 0) { rest_args = 1; temp->rest_args = 1; @@ -2747,7 +2747,7 @@ macroexpand (pfile, hp) one space except within an string or char token.*/ if (is_space[c]) { - if (CPP_WRITTEN (pfile) > arg->stringified + if (CPP_WRITTEN (pfile) > (unsigned)arg->stringified && (CPP_PWRITTEN (pfile))[-1] == '@') { /* "@ " escape markers are removed */ @@ -5528,7 +5528,7 @@ open_include_file (pfile, filename, searchptr) p = filename; if (searchptr && searchptr->fname - && strlen (searchptr->fname) == p - filename + && strlen (searchptr->fname) == (size_t) (p - filename) && ! strncmp (searchptr->fname, filename, p - filename)) { /* FILENAME is in SEARCHPTR, which we've already checked. */ |

