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
This commit is contained in:
Gabriel Dos Reis 2002-10-09 00:13:57 +00:00 committed by Gabriel Dos Reis
parent cef1c1bac1
commit 8d15eebcb0
3 changed files with 9 additions and 1 deletions

View 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

View 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);

View 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