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/cpplib.h | |
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/cpplib.h')
-rw-r--r-- | gcc/cpplib.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h index 520f2a2eac9..9063647f6db 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -191,11 +191,22 @@ struct cpp_token }; /* A type wide enough to hold any multibyte source character. - cpplib's character constant interpreter uses shifts, and so - requires an unsigned type. */ -typedef unsigned int cppchar_t; -/* Its signed equivalent. */ -typedef int cppchar_signed_t; + cpplib's character constant interpreter requires an unsigned type. + Also, a typedef for the signed equivalent. */ +#ifndef MAX_WCHAR_TYPE_SIZE +# define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE +#endif +#if SIZEOF_INT >= MAX_WCHAR_TYPE_SIZE +# define CPPCHAR_SIGNED_T int +#else +# if SIZEOF_LONG >= MAX_WCHAR_TYPE_SIZE || !HAVE_LONG_LONG +# define CPPCHAR_SIGNED_T long +# else +# define CPPCHAR_SIGNED_T long long +# endif +#endif +typedef unsigned CPPCHAR_SIGNED_T cppchar_t; +typedef CPPCHAR_SIGNED_T cppchar_signed_t; /* Values for opts.dump_macros. dump_only means inhibit output of the preprocessed text |