c-common.c (cb_register_builtins): Define __WCHAR_MAX__.
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Wed, 9 Oct 2002 00:13:57 +0000 (00:13 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Wed, 9 Oct 2002 00:13:57 +0000 (00:13 +0000)
* c-common.c (cb_register_builtins): Define __WCHAR_MAX__.
* doc/cpp.texi (Common Predefined Macros): Document.

From-SVN: r57966

gcc/ChangeLog
gcc/c-common.c
gcc/doc/cpp.texi

index 43077c0cffe971c5c0edbcb9ae5b872ec2acd5c1..8b4e01585f9d2577e6f9f9ae79dd3a2ecc6d8634 100644 (file)
@@ -2,6 +2,11 @@
 
        * libgcc2.c (__floatdisf): Properly cure double rounding.
 
+2002-10-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       * c-common.c (cb_register_builtins): Define __WCHAR_MAX__.
+       * doc/cpp.texi (Common Predefined Macros): Document.
+
 2002-10-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        PR doc/7484
index 4350f25ddaf24fda73c925f4743ad790a83cb60c..fe4d5ccd32e890e3841c54986773bcb0bd56a11c 100644 (file)
@@ -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);
 
index 8d5bde710261769e75cc1568756073cc12bee8c6..bc237c7729dfbfea3acf959c3dba49267bfed326 100644 (file)
@@ -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