aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2002-10-09 00:13:57 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2002-10-09 00:13:57 +0000
commit8d15eebcb0583a8613a94739baa56ad2ab0414aa (patch)
treeeee3271d3df4bf0922f7e84b369290a62eb5305f
parentcef1c1bac1d3418354c1016599b40455505ec599 (diff)
downloadgcc-8d15eebcb0583a8613a94739baa56ad2ab0414aa.zip
gcc-8d15eebcb0583a8613a94739baa56ad2ab0414aa.tar.gz
gcc-8d15eebcb0583a8613a94739baa56ad2ab0414aa.tar.bz2
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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-common.c1
-rw-r--r--gcc/doc/cpp.texi4
3 files changed, 9 insertions, 1 deletions
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 <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
* 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