summaryrefslogtreecommitdiff
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-13 17:34:18 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-13 17:34:18 +0000
commit69edc0b32f2df3bcc89e891d81786ab1277ec8a2 (patch)
treea7cccc1c8ac0a9c5388a19e98814b9a1cc541648 /gcc/cpplib.h
parenta2ec67f92b7bc896077cba67d8ce86f591695179 (diff)
downloadgcc-69edc0b32f2df3bcc89e891d81786ab1277ec8a2.tar.gz
* Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H).
(hashtable.o, line-map.o, mkdeps.o): Likewise, from dependency list. Move these all together down by cpplib. * cpplib.h: Don't refer to MAX_WCHAR_TYPE_SIZE when determining definition of CPPCHAR_SIGNED_T. * cppcharset.c, cpperror.c, cppexp.c, cppfiles.c, cpphash.c, cppinit.c * cpplex.c, cpplib.c, cppmacro.c, cpppch.c, cpptrad.c, hashtable.c * line-map.c, mkdeps.c: Don't include coretypes.h or tm.h. * cpphash.c (_cpp_init_hashtable): Don't use gcc_obstack_init. * cppinit.c (cpp_create_reader): Likewise. * cpphash.h (scan_out_logical_line): Rename _cpp_scan_out_logical_line. * cpptrad.c: Likewise. All callers changed. * cpplib.c: All callers changed. * c-ppoutput.c: Replace 'uchar' with 'unsigned char' throughout. * hashtable.h: Define GTY(x) to nothing here too. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69298 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index 661bbe5467d..434e455331a 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -191,18 +191,18 @@ struct cpp_token
/* A type wide enough to hold any multibyte source character.
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 CHAR_BIT * SIZEOF_INT >= MAX_WCHAR_TYPE_SIZE
+ Also, a typedef for the signed equivalent.
+ The width of this type is capped at 32 bits; there do exist targets
+ where wchar_t is 64 bits, but only in a non-default mode, and there
+ would be no meaningful interpretation for a wchar_t value greater
+ than 2^32 anyway -- the widest wide-character encoding around is
+ ISO 10646, which stops at 2^31. */
+#if CHAR_BIT * SIZEOF_INT >= 32
# define CPPCHAR_SIGNED_T int
+#elif CHAR_BIT * SIZEOF_LONG >= 32
+# define CPPCHAR_SIGNED_T long
#else
-# if CHAR_BIT * SIZEOF_LONG >= MAX_WCHAR_TYPE_SIZE || !HAVE_LONG_LONG
-# define CPPCHAR_SIGNED_T long
-# else
-# define CPPCHAR_SIGNED_T long long
-# endif
+# error "Cannot find a least-32-bit signed integer type"
#endif
typedef unsigned CPPCHAR_SIGNED_T cppchar_t;
typedef CPPCHAR_SIGNED_T cppchar_signed_t;