diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-04 16:00:48 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-04 16:00:48 +0000 |
commit | 55dbcdfe54e4955cb04c628c49d75525c2edf076 (patch) | |
tree | 8c20d31a5a3346141ee1d77b93b4c4c72c1ee29c | |
parent | 4f449834ce9ec09ed80726b565e281942d419718 (diff) | |
download | gcc-55dbcdfe54e4955cb04c628c49d75525c2edf076.tar.gz |
* ginclude/stddef.h: Don't declare wint_t unless __need_wint_t.
* c-common.h (enum c_tree_index): Add CTI_WINT_TYPE.
(wint_type_node): Define.
* c-decl.c (WINT_TYPE): Define.
(init_decl_processing): Create the wint_type_node type.
* c-common.c (T_WI): Define.
(print_char_table): Use T_WI for %lc format.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35481 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/c-common.c | 3 | ||||
-rw-r--r-- | gcc/c-common.h | 2 | ||||
-rw-r--r-- | gcc/c-decl.c | 6 | ||||
-rw-r--r-- | gcc/ginclude/stddef.h | 2 |
5 files changed, 21 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a7689cbff3..2a0d1413791 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk> + + * ginclude/stddef.h: Don't declare wint_t unless __need_wint_t. + * c-common.h (enum c_tree_index): Add CTI_WINT_TYPE. + (wint_type_node): Define. + * c-decl.c (WINT_TYPE): Define. + (init_decl_processing): Create the wint_type_node type. + * c-common.c (T_WI): Define. + (print_char_table): Use T_WI for %lc format. + 2000-08-04 Bruce Korb <bkorb@gnu.org> * fixinc/: Verified that the MSDOS patch does not break diff --git a/gcc/c-common.c b/gcc/c-common.c index 11f16498c42..a94a8092beb 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1193,6 +1193,7 @@ strip_attrs (specs_attrs) #define T_UC &unsigned_char_type_node #define T_V &void_type_node #define T_W &wchar_type_node +#define T_WI &wint_type_node #define T_ST &sizetype typedef struct { @@ -1229,7 +1230,7 @@ static format_char_info print_char_table[] = { /* A GNU extension. */ { "m", 0, T_V, NULL, NULL, NULL, NULL, NULL, NULL, "-wp" }, { "feEgGaA", 0, T_D, NULL, NULL, NULL, NULL, T_LD, NULL, "-wp0 +#" }, - { "c", 0, T_I, NULL, NULL, T_W, NULL, NULL, NULL, "-w" }, + { "c", 0, T_I, NULL, NULL, T_WI, NULL, NULL, NULL, "-w" }, { "C", 0, T_W, NULL, NULL, NULL, NULL, NULL, NULL, "-w" }, { "s", 1, T_C, NULL, NULL, T_W, NULL, NULL, NULL, "-wp" }, { "S", 1, T_W, NULL, NULL, NULL, NULL, NULL, NULL, "-wp" }, diff --git a/gcc/c-common.h b/gcc/c-common.h index a7675dda05f..c8a9569809e 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -91,6 +91,7 @@ enum c_tree_index CTI_WCHAR_TYPE, CTI_SIGNED_WCHAR_TYPE, CTI_UNSIGNED_WCHAR_TYPE, + CTI_WINT_TYPE, CTI_WIDEST_INT_LIT_TYPE, CTI_WIDEST_UINT_LIT_TYPE, @@ -122,6 +123,7 @@ enum c_tree_index #define wchar_type_node c_global_trees[CTI_WCHAR_TYPE] #define signed_wchar_type_node c_global_trees[CTI_SIGNED_WCHAR_TYPE] #define unsigned_wchar_type_node c_global_trees[CTI_UNSIGNED_WCHAR_TYPE] +#define wint_type_node c_global_trees[CTI_WINT_TYPE] #define widest_integer_literal_type_node c_global_trees[CTI_WIDEST_INT_LIT_TYPE] #define widest_unsigned_literal_type_node c_global_trees[CTI_WIDEST_UINT_LIT_TYPE] diff --git a/gcc/c-decl.c b/gcc/c-decl.c index a9eb6199136..886e3740f82 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -74,6 +74,10 @@ enum decl_context #ifndef WCHAR_TYPE #define WCHAR_TYPE "int" #endif + +#ifndef WINT_TYPE +#define WINT_TYPE "unsigned int" +#endif /* Do GC. */ int ggc_p = 1; @@ -3037,6 +3041,8 @@ init_decl_processing () signed_wchar_type_node = signed_type (wchar_type_node); unsigned_wchar_type_node = unsigned_type (wchar_type_node); + wint_type_node = TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (WINT_TYPE))); + boolean_type_node = integer_type_node; boolean_true_node = integer_one_node; boolean_false_node = integer_zero_node; diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h index a964410bfb7..661d95d0785 100644 --- a/gcc/ginclude/stddef.h +++ b/gcc/ginclude/stddef.h @@ -302,7 +302,7 @@ typedef __WCHAR_TYPE__ wchar_t; #undef __need_wchar_t #endif /* _STDDEF_H or __need_wchar_t. */ -#if defined (_STDDEF_H) || defined (__need_wint_t) +#if defined (__need_wint_t) #ifndef _WINT_T #define _WINT_T |