OSDN Git Service

* lto-cgraph.c (lto_output_varpool_node): Always output constant pool
[pf3gnuchains/gcc-fork.git] / gcc / varray.c
index 4533039..91e5b5d 100644 (file)
@@ -1,5 +1,5 @@
 /* Virtual array support.
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008
    Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
@@ -49,13 +49,13 @@ static htab_t varray_hash;
 static hashval_t
 hash_descriptor (const void *p)
 {
-  const struct varray_descriptor *d = p;
+  const struct varray_descriptor *d = (const struct varray_descriptor *) p;
   return htab_hash_pointer (d->name);
 }
 static int
 eq_descriptor (const void *p1, const void *p2)
 {
-  const struct varray_descriptor *d = p1;
+  const struct varray_descriptor *d = (const struct varray_descriptor *) p1;
   return d->name == p2;
 }
 
@@ -71,10 +71,10 @@ varray_descriptor (const char *name)
   slot = (struct varray_descriptor **)
     htab_find_slot_with_hash (varray_hash, name,
                              htab_hash_pointer (name),
-                             1);
+                             INSERT);
   if (*slot)
     return *slot;
-  *slot = xcalloc (sizeof (**slot), 1);
+  *slot = XCNEW (struct varray_descriptor);
   (*slot)->name = name;
   return *slot;
 }