This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Usage of __attribute__used__ in (system) headers?
On 02/20/2013 11:06 AM, Thomas Schwinge wrote:
> ports/
> * sysdeps/mips/bits/nan.h [!__GNUC__] (__nan_union): Change
> __attribute_used__ to __attribute__ ((unused)).
>
> diff --git ports/sysdeps/mips/bits/nan.h ports/sysdeps/mips/bits/nan.h
> index 71f372d..8f4666d 100644
> --- ports/sysdeps/mips/bits/nan.h
> +++ ports/sysdeps/mips/bits/nan.h
> @@ -50,7 +50,7 @@
> # endif
>
> static union { unsigned char __c[4]; float __d; } __nan_union
> - __attribute_used__ = { __nan_bytes };
> + __attribute__ ((unused)) = { __nan_bytes };
> # define NAN (__nan_union.__d)
>
> #endif /* GCC. */
> diff --git sysdeps/ieee754/bits/nan.h sysdeps/ieee754/bits/nan.h
> index d3ab38b..a1e6a51 100644
> --- sysdeps/ieee754/bits/nan.h
> +++ sysdeps/ieee754/bits/nan.h
> @@ -46,7 +46,7 @@
> # endif
>
> static union { unsigned char __c[4]; float __d; } __nan_union
> - __attribute_used__ = { __nan_bytes };
> + __attribute__ ((unused)) = { __nan_bytes };
> # define NAN (__nan_union.__d)
>
> #endif /* GCC. */
Please fix this to use __unused__.
We should not use attributes that are in the user's namespace.
Cheers,
Carlos.