Am 27.12.2011 16:11, schrieb Avi Kivity:
> C99 appears to consider compound literals as non-constants, and complains
> when they are used in static initializers.  Switch to ordinary initializer
> syntax.
> 
> Signed-off-by: Avi Kivity <a...@redhat.com>

Acked-by: Andreas Färber <afaer...@suse.de>

For the record, tested with --extra-cflags=-std=gnu99.

> diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h
> index c5e2dab..4902450 100644
> --- a/fpu/softfloat-specialize.h
> +++ b/fpu/softfloat-specialize.h
> @@ -89,8 +89,8 @@ const float64 float64_default_nan = const_float64(LIT64( 
> 0xFFF8000000000000 ));
>  #define floatx80_default_nan_low  LIT64( 0xC000000000000000 )
>  #endif
>  
> -const floatx80 floatx80_default_nan = 
> make_floatx80(floatx80_default_nan_high,
> -                                                    
> floatx80_default_nan_low);
> +const floatx80 floatx80_default_nan
> +    = make_floatx80_init(floatx80_default_nan_high, 
> floatx80_default_nan_low);

Calling it init_floatx80 would avoid the line break, but I'm okay with
it either way.

Thanks,
Andreas


$ gcc --version
gcc (SUSE Linux) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to