diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-05-04 04:38:01 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-05-04 04:38:01 +0000 |
commit | 12cf91fef042b190014d9dbd205fb29da2bb4ccf (patch) | |
tree | 32af1382b7b6344ab51affdb8e243e9ecedf4e69 /gcc/cpplex.c | |
parent | 22a8784041d6222be1e1fbdbb81054d16ed5e092 (diff) | |
download | gcc-12cf91fef042b190014d9dbd205fb29da2bb4ccf.zip gcc-12cf91fef042b190014d9dbd205fb29da2bb4ccf.tar.gz gcc-12cf91fef042b190014d9dbd205fb29da2bb4ccf.tar.bz2 |
cpphash.h (U): New define, to correct type of string constants.
gcc:
* cpphash.h (U): New define, to correct type of string constants.
(ustrcmp, ustrncmp, ustrlen, uxstrdup, ustrchr): New wrapper
routines, to do casts when passing unsigned strings to libc.
* cppexp.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c: Use them.
* cppfiles.c (_cpp_execute_include): Make filename an U_CHAR *.
* cpphash.c (_cpp_quote_string): Make string an U_CHAR *.
* cppinit.c (dump_special_to_buffer): Make macro name an U_CHAR *.
* cpplex.c (parse_ifdef, parse_include, validate_else): Make
second argument an U_CHAR *.
* cppinit.c (builtin_array): Make name and value U_CHAR *, add
length field, clean up initializer.
(ISTABLE): Add __extension__ to designated-
initializers version.
* cpplex.c (CHARTAB): Likewise.
* mbchar.c: Add dummy external declaration to the !MULTIBYTE_CHARS
case so the file won't be empty.
include:
* symcat.h: Remove #endif label.
From-SVN: r33657
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index f011054..9e068a3 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -1720,13 +1720,13 @@ find_position (start, limit, linep) #define UCHAR_MAX 255 /* assume 8-bit bytes */ #endif -#if (GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L) +#if (GCC_VERSION >= 2007) #define init_chartab() /* nothing */ -#define CHARTAB static const unsigned char chartab[UCHAR_MAX + 1] = { +#define CHARTAB __extension__ static const U_CHAR chartab[UCHAR_MAX + 1] = { #define END }; #define s(p, v) [p] = v, #else -#define CHARTAB static unsigned char chartab[UCHAR_MAX + 1] = { 0 }; \ +#define CHARTAB static U_CHAR chartab[UCHAR_MAX + 1] = { 0 }; \ static void init_chartab PARAMS ((void)) { \ unsigned char *x = chartab; #define END } |