summaryrefslogtreecommitdiff
path: root/gcc/alloc-pool.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-29 04:39:16 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-29 04:39:16 +0000
commitc768b48b8d38dca97809ea1dc72de2cebd05b6c6 (patch)
tree2b48e3a63388183c42752ae73ac281a65cd85dd7 /gcc/alloc-pool.c
parenta0a1d5635c8086d6a7e16e38b6f533da669678d8 (diff)
downloadgcc-c768b48b8d38dca97809ea1dc72de2cebd05b6c6.tar.gz
* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
* df-scan.c (df_notes_rescan): Likewise. * ggc-page.c (set_page_table_entry): Likewise. * intl.c (gcc_gettext_width): Likewise. * varasm.c (get_unnamed_section, get_noswitch_section, get_section): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137245 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alloc-pool.c')
-rw-r--r--gcc/alloc-pool.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/alloc-pool.c b/gcc/alloc-pool.c
index d5d1fab79af..b22869fe787 100644
--- a/gcc/alloc-pool.c
+++ b/gcc/alloc-pool.c
@@ -119,7 +119,7 @@ alloc_pool
create_alloc_pool (const char *name, size_t size, size_t num)
{
alloc_pool pool;
- size_t pool_size, header_size;
+ size_t header_size;
#ifdef GATHER_STATISTICS
struct alloc_pool_descriptor *desc;
#endif
@@ -141,11 +141,8 @@ create_alloc_pool (const char *name, size_t size, size_t num)
/* Um, we can't really allocate 0 elements per block. */
gcc_assert (num);
- /* Find the size of the pool structure, and the name. */
- pool_size = sizeof (struct alloc_pool_def);
-
- /* and allocate that much memory. */
- pool = xmalloc (pool_size);
+ /* Allocate memory for the pool structure. */
+ pool = XNEW (struct alloc_pool_def);
/* Now init the various pieces of our pool structure. */
pool->name = /*xstrdup (name)*/name;