Commit 579f50b6 by Richard Kenner

(next_type_uid): Move definition to reasonable place. (copy_node):

Make new DECL_UID and TYPE_UID as comments say.

From-SVN: r3968
parent 0b540bf4
...@@ -245,6 +245,8 @@ static int do_identifier_warnings; ...@@ -245,6 +245,8 @@ static int do_identifier_warnings;
/* Unique id for next decl created. */ /* Unique id for next decl created. */
static int next_decl_uid; static int next_decl_uid;
/* Unique id for next type created. */
static int next_type_uid = 1;
extern char *mode_name[]; extern char *mode_name[];
...@@ -908,11 +910,7 @@ make_node (code) ...@@ -908,11 +910,7 @@ make_node (code)
break; break;
case 't': 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_ALIGN (t) = 1;
TYPE_MAIN_VARIANT (t) = t; TYPE_MAIN_VARIANT (t) = t;
break; break;
...@@ -987,6 +985,11 @@ copy_node (node) ...@@ -987,6 +985,11 @@ copy_node (node)
TREE_CHAIN (t) = 0; 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); TREE_PERMANENT (t) = (current_obstack == &permanent_obstack);
return t; return t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment