aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-03-02 18:29:56 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-03-02 13:29:56 -0500
commit21318741bb4f00d87f558a2f11d462fa61381e80 (patch)
tree012b815e352352c505a47f997f46e1b9d2d6618a /gcc/stor-layout.c
parent42f602d842e3fe935b626e082eff27d5621ea2b3 (diff)
downloadgcc-21318741bb4f00d87f558a2f11d462fa61381e80.zip
gcc-21318741bb4f00d87f558a2f11d462fa61381e80.tar.gz
gcc-21318741bb4f00d87f558a2f11d462fa61381e80.tar.bz2
c-common.c (c_common_nodes_and_builtins): Make sizetype_endlink reference the language-equivalent of sizetype.
* c-common.c (c_common_nodes_and_builtins): Make sizetype_endlink reference the language-equivalent of sizetype. * c-typeck.c (comptypes): Treat sizetype like its language equivalent. * fold-const.c (size_binop, size_diffop): Put back checks. * gcse.c (dump_hash_table): Fix minor error in last change. * stor-layout.c (set_sizetype): Set TYPE_DOMAIN of sizetype. Clear TYPE_{NEXT,MAIN}_VARIANT and TYPE_{POINTER,REFERENCE}_to of all sizetypes. * cp/typeck.c (comptypes): Treat sizetype like its language equivalent. From-SVN: r32291
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index c1187b7..ab92569 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1402,6 +1402,7 @@ set_sizetype (type)
/* Make copies of nodes since we'll be setting TYPE_IS_SIZETYPE. */
sizetype = copy_node (type);
+ TYPE_DOMAIN (sizetype) = type;
bitsizetype = make_node (INTEGER_TYPE);
TYPE_NAME (bitsizetype) = TYPE_NAME (type);
TYPE_PRECISION (bitsizetype) = precision;
@@ -1430,8 +1431,15 @@ set_sizetype (type)
TYPE_NAME (bitsizetype) = get_identifier ("bit_size_type");
+ /* Show is a sizetype, is a main type, and has no pointers to it. */
for (i = 0; i < sizeof sizetype_tab / sizeof sizetype_tab[0]; i++)
- TYPE_IS_SIZETYPE (sizetype_tab[i]) = 1;
+ {
+ TYPE_IS_SIZETYPE (sizetype_tab[i]) = 1;
+ TYPE_MAIN_VARIANT (sizetype_tab[i]) = sizetype_tab[i];
+ TYPE_NEXT_VARIANT (sizetype_tab[i]) = 0;
+ TYPE_POINTER_TO (sizetype_tab[i]) = 0;
+ TYPE_REFERENCE_TO (sizetype_tab[i]) = 0;
+ }
ggc_add_tree_root ((tree *) &sizetype_tab,
sizeof sizetype_tab / sizeof (tree));