OSDN Git Service

* config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include.
[pf3gnuchains/gcc-fork.git] / gcc / ch / tree.c
index 5b69887..e9fa650 100644 (file)
@@ -1,5 +1,6 @@
 /* Language-dependent node constructors for parse phase of GNU compiler.
-   Copyright (C) 1992, 93, 1994  Free Software Foundation, Inc.
+   Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000
+   Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -15,7 +16,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 #include "config.h"
 #include "system.h"
@@ -24,14 +26,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "ch-tree.h"
 #include "toplev.h"
 
-/* Here is how primitive or already-canonicalized types' 
-   hash codes are made.  */
-#define TYPE_HASH(TYPE) ((HOST_WIDE_INT) (TYPE) & 0777777)
-
 extern struct obstack permanent_obstack;
 /* This is special sentinel used to communicate from build_string_type
    to layout_chill_range_type for the index range of a string. */
 tree string_index_type_dummy;
+
+static tree make_powerset_type                         PARAMS ((tree));
 \f
 /* Build a chill string type.
    For a character string, ELT_TYPE==char_type_node; 
@@ -62,9 +62,9 @@ build_string_type (elt_type, length)
   /* Subtract 1 from length to get max index value.
      Note we cannot use size_binop for pass 1 expressions. */
   if (TREE_CODE (length) == INTEGER_CST || pass != 1)
-    length = size_binop (MINUS_EXPR, length, integer_one_node);
+    length = size_binop (MINUS_EXPR, length, size_one_node);
   else
-    length = build (MINUS_EXPR, sizetype, length, integer_one_node);
+    length = build (MINUS_EXPR, sizetype, length, size_one_node);
 
   t = make_node (elt_type == boolean_type_node ? SET_TYPE : ARRAY_TYPE);
   TREE_TYPE (t) = elt_type;
@@ -87,7 +87,7 @@ build_string_type (elt_type, length)
   return t;
 }
 \f
-tree
+static tree
 make_powerset_type (domain)
      tree domain;
 {
@@ -109,7 +109,7 @@ layout_powerset_type (type)
 
   if (! discrete_type_p (domain))
     {
-      error ("Can only build a powerset from a discrete mode");
+      error ("can only build a powerset from a discrete mode");
       return error_mark_node;
     }
 
@@ -155,7 +155,7 @@ build_bitstring_type (size_in_bits)
 
 tree
 get_identifier3 (part1, part2, part3)
-     char *part1, *part2, *part3;
+     const char *part1, *part2, *part3;
 {
   char *buf = (char*)
     alloca (strlen(part1) + strlen(part2) + strlen(part3) + 1);
@@ -172,7 +172,7 @@ build_alias_decl (old_prefix, new_prefix, postfix)
 {
   tree decl = make_node (ALIAS_DECL);
 
-  char *postfix_pointer = IDENTIFIER_POINTER (postfix);
+  const char *postfix_pointer = IDENTIFIER_POINTER (postfix);
   int postfix_length = IDENTIFIER_LENGTH (postfix);
   int old_length = old_prefix ? IDENTIFIER_LENGTH(old_prefix) : 0;
   int new_length = new_prefix ? IDENTIFIER_LENGTH(new_prefix) : 0;
@@ -233,7 +233,7 @@ tree
 decl_check_rename (alias, old_name)
      tree alias, old_name;
 {
-  char *old_pointer = IDENTIFIER_POINTER (old_name);
+  const char *old_pointer = IDENTIFIER_POINTER (old_name);
   int old_len = IDENTIFIER_LENGTH (old_name);
   if (DECL_OLD_PREFIX (alias))
     {
@@ -286,7 +286,9 @@ discrete_count (t)
      tree t;
 {
   tree hi = convert (sizetype, TYPE_MAX_VALUE (t));
+
   if (TYPE_MIN_VALUE (t))
     hi = size_binop (MINUS_EXPR, hi, convert (sizetype, TYPE_MIN_VALUE (t)));
+
   return size_binop (PLUS_EXPR, hi, integer_one_node);
 }