Commit b1e8c0fd by Gabriel Dos Reis Committed by Gabriel Dos Reis

libiberty.h (XDELETE, [...]): Remove any const-qualification before disposal.

include/
        * libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
        const-qualification before disposal.

gcc/
        * vec.h (DEF_VEC_P): Add proper cast to uses of vec_o_reserve and
        vec_p_reserve.
        * langhooks.h (lang_hooks::builtin_function): Rename parameter
        from "class" to "bt_class".

From-SVN: r85441
parent 8965ece1
2004-08-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
* vec.h (DEF_VEC_P): Add proper cast to uses of vec_o_reserve and
vec_p_reserve.
* langhooks.h (lang_hooks::builtin_function): Rename parameter
from "class" to "bt_class".
2004-08-02 Paul Brook <paul@codesourcery.com> 2004-08-02 Paul Brook <paul@codesourcery.com>
PR rtl-optimization/15068 PR rtl-optimization/15068
......
...@@ -411,7 +411,7 @@ struct lang_hooks ...@@ -411,7 +411,7 @@ struct lang_hooks
the name to be called if we can't opencode the function. If the name to be called if we can't opencode the function. If
ATTRS is nonzero, use that for the function's attribute list. */ ATTRS is nonzero, use that for the function's attribute list. */
tree (*builtin_function) (const char *name, tree type, int function_code, tree (*builtin_function) (const char *name, tree type, int function_code,
enum built_in_class class, enum built_in_class bt_class,
const char *library_name, tree attrs); const char *library_name, tree attrs);
/* Whenever you add entries here, make sure you adjust langhooks-def.h /* Whenever you add entries here, make sure you adjust langhooks-def.h
......
...@@ -390,7 +390,7 @@ static inline int VEC_OP (TDEF,iterate) \ ...@@ -390,7 +390,7 @@ static inline int VEC_OP (TDEF,iterate) \
static inline VEC (TDEF) *VEC_OP (TDEF,alloc) \ static inline VEC (TDEF) *VEC_OP (TDEF,alloc) \
(int alloc_ MEM_STAT_DECL) \ (int alloc_ MEM_STAT_DECL) \
{ \ { \
return vec_p_reserve (NULL, alloc_ - !alloc_ PASS_MEM_STAT); \ return (VEC (TDEF) *) vec_p_reserve (NULL, alloc_ - !alloc_ PASS_MEM_STAT);\
} \ } \
\ \
static inline size_t VEC_OP (TDEF,embedded_size) \ static inline size_t VEC_OP (TDEF,embedded_size) \
...@@ -419,7 +419,7 @@ static inline int VEC_OP (TDEF,reserve) \ ...@@ -419,7 +419,7 @@ static inline int VEC_OP (TDEF,reserve) \
int extend = VEC_OP (TDEF,space) (*vec_, alloc_); \ int extend = VEC_OP (TDEF,space) (*vec_, alloc_); \
\ \
if (extend) \ if (extend) \
*vec_ = vec_p_reserve (*vec_, alloc_ PASS_MEM_STAT); \ *vec_ = (VEC (TDEF) *) vec_p_reserve (*vec_, alloc_ PASS_MEM_STAT); \
\ \
return extend; \ return extend; \
} \ } \
...@@ -583,9 +583,9 @@ static inline int VEC_OP (TDEF,iterate) \ ...@@ -583,9 +583,9 @@ static inline int VEC_OP (TDEF,iterate) \
static inline VEC (TDEF) *VEC_OP (TDEF,alloc) \ static inline VEC (TDEF) *VEC_OP (TDEF,alloc) \
(int alloc_ MEM_STAT_DECL) \ (int alloc_ MEM_STAT_DECL) \
{ \ { \
return vec_o_reserve (NULL, alloc_ - !alloc_, \ return (VEC (TDEF) *) vec_o_reserve (NULL, alloc_ - !alloc_, \
offsetof (VEC(TDEF),vec), sizeof (TDEF) \ offsetof (VEC(TDEF),vec), sizeof (TDEF)\
PASS_MEM_STAT); \ PASS_MEM_STAT); \
} \ } \
\ \
static inline size_t VEC_OP (TDEF,embedded_size) \ static inline size_t VEC_OP (TDEF,embedded_size) \
...@@ -614,7 +614,7 @@ static inline int VEC_OP (TDEF,reserve) \ ...@@ -614,7 +614,7 @@ static inline int VEC_OP (TDEF,reserve) \
int extend = VEC_OP (TDEF,space) (*vec_, alloc_); \ int extend = VEC_OP (TDEF,space) (*vec_, alloc_); \
\ \
if (extend) \ if (extend) \
*vec_ = vec_o_reserve (*vec_, alloc_, \ *vec_ = (VEC (TDEF) *) vec_o_reserve (*vec_, alloc_, \
offsetof (VEC(TDEF),vec), sizeof (TDEF) \ offsetof (VEC(TDEF),vec), sizeof (TDEF) \
PASS_MEM_STAT); \ PASS_MEM_STAT); \
\ \
......
2004-08-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
* libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
const-qualification before disposal.
2004-07-24 Bernardo Innocenti <bernie@develer.com> 2004-07-24 Bernardo Innocenti <bernie@develer.com>
* ansidecl.h (ARG_UNUSED): New Macro. * ansidecl.h (ARG_UNUSED): New Macro.
......
...@@ -261,14 +261,14 @@ extern double physmem_available PARAMS ((void)); ...@@ -261,14 +261,14 @@ extern double physmem_available PARAMS ((void));
#define XNEW(T) ((T *) xmalloc (sizeof (T))) #define XNEW(T) ((T *) xmalloc (sizeof (T)))
#define XCNEW(T) ((T *) xcalloc (1, sizeof (T))) #define XCNEW(T) ((T *) xcalloc (1, sizeof (T)))
#define XDELETE(P) free ((P)) #define XDELETE(P) free ((void*) (P))
/* Array allocators. */ /* Array allocators. */
#define XNEWVEC(T, N) ((T *) xmalloc (sizeof (T) * (N))) #define XNEWVEC(T, N) ((T *) xmalloc (sizeof (T) * (N)))
#define XCNEWVEC(T, N) ((T *) xcalloc ((N), sizeof (T))) #define XCNEWVEC(T, N) ((T *) xcalloc ((N), sizeof (T)))
#define XRESIZEVEC(T, P, N) ((T *) xrealloc ((P), sizeof (T) * (N))) #define XRESIZEVEC(T, P, N) ((T *) xrealloc ((void *) (P), sizeof (T) * (N)))
#define XDELETEVEC(P) free ((P)) #define XDELETEVEC(P) free ((void*) (P))
/* Allocators for variable-sized structures and raw buffers. */ /* Allocators for variable-sized structures and raw buffers. */
......
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