diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-03-31 16:03:25 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-03-31 16:03:25 -0500 |
commit | 579f50b6c581a59c82d265bcfab116b493dcaea3 (patch) | |
tree | 156bb5f0d75b740e12892cdc5f04e1a5f40c4636 /gcc/tree.c | |
parent | 0b540bf4e57da4f21022373117d10de463888426 (diff) | |
download | gcc-579f50b6c581a59c82d265bcfab116b493dcaea3.zip gcc-579f50b6c581a59c82d265bcfab116b493dcaea3.tar.gz gcc-579f50b6c581a59c82d265bcfab116b493dcaea3.tar.bz2 |
(next_type_uid): Move definition to reasonable place. (copy_node):
Make new DECL_UID and TYPE_UID as comments say.
From-SVN: r3968
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -245,6 +245,8 @@ static int do_identifier_warnings; /* Unique id for next decl created. */ static int next_decl_uid; +/* Unique id for next type created. */ +static int next_type_uid = 1; extern char *mode_name[]; @@ -908,11 +910,7 @@ make_node (code) break; case 't': - { - static unsigned next_type_uid = 1; - - TYPE_UID (t) = next_type_uid++; - } + TYPE_UID (t) = next_type_uid++; TYPE_ALIGN (t) = 1; TYPE_MAIN_VARIANT (t) = t; break; @@ -987,6 +985,11 @@ copy_node (node) TREE_CHAIN (t) = 0; + if (TREE_CODE_CLASS (code) == 'd') + DECL_UID (t) = next_decl_uid++; + else if (TREE_CODE_CLASS (code) == 't') + TYPE_UID (t) = next_type_uid++; + TREE_PERMANENT (t) = (current_obstack == &permanent_obstack); return t; |