From 8d15eebcb0583a8613a94739baa56ad2ab0414aa Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Wed, 9 Oct 2002 00:13:57 +0000 Subject: [PATCH] c-common.c (cb_register_builtins): Define __WCHAR_MAX__. * c-common.c (cb_register_builtins): Define __WCHAR_MAX__. * doc/cpp.texi (Common Predefined Macros): Document. From-SVN: r57966 --- gcc/ChangeLog | 5 +++++ gcc/c-common.c | 1 + gcc/doc/cpp.texi | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 43077c0..8b4e015 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -4,6 +4,11 @@ 2002-10-09 Gabriel Dos Reis + * c-common.c (cb_register_builtins): Define __WCHAR_MAX__. + * doc/cpp.texi (Common Predefined Macros): Document. + +2002-10-09 Gabriel Dos Reis + PR doc/7484 * doc/invoke.texi (Option Summary): List -Wmissing-declarations as a C only option. diff --git a/gcc/c-common.c b/gcc/c-common.c index 4350f25..fe4d5cc 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -4918,6 +4918,7 @@ cb_register_builtins (pfile) builtin_define_type_max ("__INT_MAX__", integer_type_node, 0); builtin_define_type_max ("__LONG_MAX__", long_integer_type_node, 1); builtin_define_type_max ("__LONG_LONG_MAX__", long_long_integer_type_node, 2); + builtin_define_type_max ("__WCHAR_MAX__", wchar_type_node, 0); builtin_define_type_precision ("__CHAR_BIT__", char_type_node); diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index 8d5bde7..bc237c7 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -2013,11 +2013,13 @@ numerical limits work correctly. You should not use this macro directly; instead, include the appropriate headers. @item __SCHAR_MAX__ +@itemx __WCHAR_MAX__ @itemx __SHRT_MAX__ @itemx __INT_MAX__ @itemx __LONG_MAX__ @itemx __LONG_LONG_MAX__ -Defined to the maximum value of the @code{signed char}, @code{signed short}, +Defined to the maximum value of the @code{signed char}, @code{wchar_t}, +@code{signed short}, @code{signed int}, @code{signed long}, and @code{signed long long} types respectively. They exist to make the standard header given numerical limits work correctly. You should not use these macros directly; instead, include -- 2.7.4