This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: abstract over necessary casts for obstack_finish
- From: DJ Delorie <dj at redhat dot com>
- To: gdr at integrable-solutions dot net
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 Jun 2005 16:48:20 -0400
- Subject: Re: PATCH: abstract over necessary casts for obstack_finish
- References: <m3k6l7p6sc.fsf@uniton.integrable-solutions.net>
> libiberty/
> 2005-06-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
>
> * libiberty.h (XOBFINISH): New.
This part is fine, although it doesn't buy you much savings on typing
;-)
> Index: include/libiberty.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/include/libiberty.h,v
> retrieving revision 1.58
> diff -u -r1.58 libiberty.h
> --- include/libiberty.h 2 Jun 2005 02:01:03 -0000 1.58
> +++ include/libiberty.h 6 Jun 2005 18:33:50 -0000
> @@ -326,7 +326,7 @@
> /* Type-safe obstack allocator. */
>
> #define XOBNEW(O, T) ((T *) obstack_alloc ((O), sizeof (T)))
> -
> +#define XOBFINISH(O, T) ((T) obstack_finish ((O)))
>
> /* hex character manipulation routines */