Subject: Re: gcc4 status
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-toolchain
Date: 05/23/2006 10:27:02
On May 23, 2006, at 10:25 AM, Izumi Tsutsui wrote:
> thorpej@shagadelic.org wrote:
>
>> The (void) casts are intended to consume all of the arguments.
>
> Is this patch acceptable to suppress gcc4's
> "left-hand operand of comma expression has no effect"
> warning, or is there any better answer? (use do{}while(0)?)
Yours looks fine.
> ---
> Izumi Tsutsui
>
>
> Index: arch/cobalt/include/bus.h
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/cobalt/include/bus.h,v
> retrieving revision 1.18
> diff -u -r1.18 bus.h
> --- arch/cobalt/include/bus.h 18 May 2006 15:37:05 -0000 1.18
> +++ arch/cobalt/include/bus.h 23 May 2006 17:19:13 -0000
> @@ -531,9 +531,9 @@
> *
> * On the MIPS, we just flush the write buffer.
> */
> -#define bus_space_barrier(t, h, o, l, f) \
> - ((void)((void)(t), (void)(h), (void)(o), (void)(l), (void)(f)), \
> - wbflush())
> +#define bus_space_barrier(t, h, o, l, f) \
> + (wbflush(), \
> + (void)((void)(t), (void)(h), (void)(o), (void)(l), (void)(f)))
> #define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */
> #define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */
>
-- thorpej