OSDN Git Service

* g++.dg/lookup/new1.C: Fix dg-excess-error syntax.
[pf3gnuchains/gcc-fork.git] / gcc / tree.c
index 009888a..5e95ab6 100644 (file)
@@ -48,7 +48,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "tree-iterator.h"
 #include "basic-block.h"
 #include "tree-flow.h"
-#include "opts.h"
 
 /* obstack.[ch] explicitly declined to prototype this.  */
 extern int _obstack_allocated_p (struct obstack *h, void *obj);
@@ -310,10 +309,7 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
       DECL_USER_ALIGN (t) = 0;
       DECL_IN_SYSTEM_HEADER (t) = in_system_header;
       DECL_SOURCE_LOCATION (t) = input_location;
-      if (code == TRANSLATION_UNIT_DECL)
-       DECL_UID (t) = cur_in_fname;
-      else
-       DECL_UID (t) = next_decl_uid++;
+      DECL_UID (t) = next_decl_uid++;
 
       /* We have not yet computed the alias set for this declaration.  */
       DECL_POINTER_ALIAS_SET (t) = -1;
@@ -386,7 +382,7 @@ copy_node_stat (tree node MEM_STAT_DECL)
   TREE_VISITED (t) = 0;
   t->common.ann = 0;
 
-  if (TREE_CODE_CLASS (code) == 'd' && code != TRANSLATION_UNIT_DECL)
+  if (TREE_CODE_CLASS (code) == 'd')
     DECL_UID (t) = next_decl_uid++;
   else if (TREE_CODE_CLASS (code) == 't')
     {
@@ -4133,6 +4129,28 @@ build_index_type (tree maxval)
     return itype;
 }
 
+/* Builds a signed or unsigned integer type of precision PRECISION.
+   Used for C bitfields whose precision does not match that of
+   built-in target types.  */
+tree
+build_nonstandard_integer_type (unsigned HOST_WIDE_INT precision,
+                               int unsignedp)
+{
+  tree itype = make_node (INTEGER_TYPE);
+
+  TYPE_PRECISION (itype) = precision;
+
+  if (unsignedp)
+    fixup_unsigned_type (itype);
+  else
+    fixup_signed_type (itype);
+
+  if (host_integerp (TYPE_MAX_VALUE (itype), 1))
+    return type_hash_canon (tree_low_cst (TYPE_MAX_VALUE (itype), 1), itype);
+
+  return itype;
+}
+
 /* Create a range of some discrete type TYPE (an INTEGER_TYPE,
    ENUMERAL_TYPE, BOOLEAN_TYPE, or CHAR_TYPE), with
    low bound LOWVAL and high bound HIGHVAL.
@@ -5341,14 +5359,6 @@ make_or_reuse_type (unsigned size, int unsignedp)
 void
 build_common_tree_nodes (int signed_char)
 {
-  /* This function is called after command line parsing is complete,
-     but before any DECL nodes should have been created.  Therefore,
-     now is the appropriate time to adjust next_decl_uid so that the
-     range 0 .. num_in_fnames-1 is reserved for TRANSLATION_UNIT_DECLs.  */
-  if (next_decl_uid)
-    abort ();
-  next_decl_uid = num_in_fnames;
-
   error_mark_node = make_node (ERROR_MARK);
   TREE_TYPE (error_mark_node) = error_mark_node;