tidy builtin cpp macros
Richard Henderson
rth@twiddle.net
Mon Sep 23 04:33:00 GMT 2002
These were added for libstdc++ support. They are no longer used.
r~
* c-common.c (cpp_define_data_format): Remove.
(cb_register_builtins): Don't define __WCHAR_BIT__, __SHRT_BIT__,
__INT_BIT__, __LONG_BIT__, __LONG_LONG_BIT__, __FLOAT_BIT__,
__DOUBLE_BIT__, __LONG_DOUBLE_BIT__.
* doc/cpp.texi: Don't document them either.
(__SCHAR_MAX__, __SHRT_MAX__, __INT_MAX__, __LONG_MAX__,
__LONG_LONG_MAX__): Document.
(__TARGET_FLOAT_FORMAT__): Remove.
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.383
diff -u -p -r1.383 c-common.c
--- c-common.c 23 Sep 2002 09:22:12 -0000 1.383
+++ c-common.c 23 Sep 2002 11:31:15 -0000
@@ -783,7 +783,6 @@ static void builtin_define_with_hex_fp_v
int, const char *,
const char *));
static void builtin_define_type_max PARAMS ((const char *, tree, int));
-static void cpp_define_data_format PARAMS ((cpp_reader *));
static void builtin_define_type_precision PARAMS ((const char *, tree));
static void builtin_define_float_constants PARAMS ((const char *,
const char *, tree));
@@ -4701,44 +4700,6 @@ boolean_increment (code, arg)
return val;
}
-/* Define macros necessary to describe fundamental data type formats. */
-static void
-cpp_define_data_format (pfile)
- cpp_reader *pfile;
-{
- const char *format;
-
- /* Define supported floating-point format enumeration values. */
- cpp_define (pfile, "__UNKNOWN_FORMAT__=0");
- cpp_define (pfile, "__IEEE_FORMAT__=1");
- cpp_define (pfile, "__IBM_FORMAT__=2");
- cpp_define (pfile, "__C4X_FORMAT__=3");
- cpp_define (pfile, "__VAX_FORMAT__=4");
-
- switch (TARGET_FLOAT_FORMAT)
- {
- case UNKNOWN_FLOAT_FORMAT:
- format = "__UNKNOWN_FORMAT__";
- break;
- case IEEE_FLOAT_FORMAT:
- format = "__IEEE_FORMAT__";
- break;
- case VAX_FLOAT_FORMAT:
- format = "__VAX_FORMAT__";
- break;
- case IBM_FLOAT_FORMAT:
- format = "__IBM_FORMAT__";
- break;
- case C4X_FLOAT_FORMAT:
- format = "__C4X_FORMAT__";
- break;
- default:
- abort();
- }
-
- builtin_define_with_value ("__GCC_FLOAT_FORMAT__", format, 0);
-}
-
/* Define NAME with value TYPE precision. */
static void
builtin_define_type_precision (name, type)
@@ -4955,15 +4916,6 @@ cb_register_builtins (pfile)
builtin_define_type_max ("__LONG_LONG_MAX__", long_long_integer_type_node, 2);
builtin_define_type_precision ("__CHAR_BIT__", char_type_node);
- builtin_define_type_precision ("__WCHAR_BIT__", wchar_type_node);
- builtin_define_type_precision ("__SHRT_BIT__", short_integer_type_node);
- builtin_define_type_precision ("__INT_BIT__", integer_type_node);
- builtin_define_type_precision ("__LONG_BIT__", long_integer_type_node);
- builtin_define_type_precision ("__LONG_LONG_BIT__",
- long_long_integer_type_node);
- builtin_define_type_precision ("__FLOAT_BIT__", float_type_node);
- builtin_define_type_precision ("__DOUBLE_BIT__", double_type_node);
- builtin_define_type_precision ("__LONG_DOUBLE_BIT__", long_double_type_node);
/* float.h needs to know these. */
@@ -5013,8 +4965,6 @@ cb_register_builtins (pfile)
if (c_language == clk_cplusplus && TREE_UNSIGNED (wchar_type_node))
cpp_define (pfile, "__WCHAR_UNSIGNED__");
- cpp_define_data_format (pfile);
-
/* Make the choice of ObjC runtime visible to source code. */
if (flag_objc && flag_next_runtime)
cpp_define (pfile, "__NEXT_RUNTIME__");
Index: doc/cpp.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/cpp.texi,v
retrieving revision 1.47
diff -u -p -r1.47 cpp.texi
--- doc/cpp.texi 21 Sep 2002 16:32:49 -0000 1.47
+++ doc/cpp.texi 23 Sep 2002 11:31:16 -0000
@@ -2007,20 +2007,21 @@ these macros directly; instead, include
the typedefs.
@item __CHAR_BIT__
-@itemx __WCHAR_BIT__
-@itemx __SHRT_BIT__
-@itemx __INT_BIT__
-@itemx __LONG_BIT__
-@itemx __LONG_LONG_BIT__
-@itemx __FLOAT_BIT__
-@itemx __DOUBLE_BIT__
-@itemx __LONG_DOUBLE_BIT__
-These macros are defined to the number of bits used in the
-representation of the data types @code{char}, @code{wchar_t},
-@code{short}, @code{int}, @code{long}, @code{long long}, @code{float},
-@code{double} and @code{long double}. They exist to make the standard
-header given numerical limits work correctly. You should not use
-these macros directly; instead, include the appropriate headers.
+Defined to the number of bits used in the representation of the
+@code{char} data type. It exists to make the standard header given
+numerical limits work correctly. You should not use
+this macro directly; instead, include the appropriate headers.
+
+@item __SCHAR_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},
+@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
+the appropriate headers.
@item __USING_SJLJ_EXCEPTIONS__
This macro is defined, with value 1, if the compiler uses the old
@@ -2032,12 +2033,6 @@ This macro is defined, with value 1, if
(as in @option{-fnext-runtime}) is in use for Objective-C. If the GNU
runtime is used, this macro is not defined, so that you can use this
macro to determine which runtime (NeXT or GNU) is being used.
-
-@item __TARGET_FLOAT_FORMAT__
-This macro is defined to describe the floating-point format used by the
-target. It has value in the set comprised of:
-@code{__UNKNOWN_FORMAT__}, @code{__IEEE_FORMAT__},
-@code{__IBM_FORMAT__}, @code{__C4X_FORMAT__} and @code{__VAX_FORMAT__}.
@end table
@node System-specific Predefined Macros
More information about the Gcc-patches
mailing list