diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-04 19:42:01 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-04 19:42:01 +0000 |
commit | 40855b3039fe63b317142ae2cdb591b4fef02d95 (patch) | |
tree | 93fad2ddad4007e009671f2fd3bcb16a3937b345 /gcc/cpplex.c | |
parent | d3ceaee1b851570b269f8533b5690726512c1dfc (diff) | |
download | gcc-40855b3039fe63b317142ae2cdb591b4fef02d95.tar.gz |
* cppinit.c (MAX_WCHAR_TYPE_SIZE): Move to cpplib.h
(cpp_post_options): Move sanity checks to...
(sanity_checks): New.
* cpplex.c (maybe_read_ucs): Fix prototype.
(parse_string, cpp_parse_escape): Cast for %c format specifier.
* cpplib.h (cppchar_t): Use unsigned long or unsigned long long
if necessary.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53163 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 0a260490af7..51c82b20608 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -80,7 +80,7 @@ static void save_comment PARAMS ((cpp_reader *, cpp_token *, const uchar *, cppchar_t)); static int name_p PARAMS ((cpp_reader *, const cpp_string *)); static int maybe_read_ucs PARAMS ((cpp_reader *, const unsigned char **, - const unsigned char *, unsigned int *)); + const unsigned char *, cppchar_t *)); static tokenrun *next_tokenrun PARAMS ((tokenrun *)); static unsigned int hex_digit_value PARAMS ((unsigned int)); @@ -695,7 +695,7 @@ parse_string (pfile, token, terminator) unterminated: if (CPP_OPTION (pfile, lang) != CLK_ASM || terminator == '>') cpp_error (pfile, DL_ERROR, "missing terminating %c character", - terminator); + (int) terminator); buffer->cur--; break; } @@ -1648,7 +1648,7 @@ maybe_read_ucs (pfile, pstr, limit, pc) cpp_reader *pfile; const unsigned char **pstr; const unsigned char *limit; - unsigned int *pc; + cppchar_t *pc; { const unsigned char *p = *pstr; unsigned int code = 0; @@ -1763,7 +1763,7 @@ cpp_parse_escape (pfile, pstr, limit, wide) case 'e': case 'E': if (CPP_PEDANTIC (pfile)) cpp_error (pfile, DL_PEDWARN, - "non-ISO-standard escape sequence, '\\%c'", c); + "non-ISO-standard escape sequence, '\\%c'", (int) c); c = TARGET_ESC; break; @@ -1838,9 +1838,11 @@ cpp_parse_escape (pfile, pstr, limit, wide) if (unknown) { if (ISGRAPH (c)) - cpp_error (pfile, DL_PEDWARN, "unknown escape sequence '\\%c'", c); + cpp_error (pfile, DL_PEDWARN, + "unknown escape sequence '\\%c'", (int) c); else - cpp_error (pfile, DL_PEDWARN, "unknown escape sequence: '\\%03o'", c); + cpp_error (pfile, DL_PEDWARN, + "unknown escape sequence: '\\%03o'", (int) c); } if (c > mask) |