PATCH: abstract over necessary casts for obstack_finish
DJ Delorie
dj@redhat.com
Mon Jun 6 20:48:00 GMT 2005
> 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 */
More information about the Gcc-patches
mailing list