Usage of __attribute__used__ in (system) headers?

Thomas Schwinge thomas@codesourcery.com
Wed Feb 20 17:56:00 GMT 2013


Hi!

On Wed, 20 Feb 2013 11:25:22 -0500, Carlos O'Donell <carlos@redhat.com> wrote:
> >  static union { unsigned char __c[4]; float __d; } __nan_union
> > -    __attribute_used__ = { __nan_bytes };
> > +  __attribute__ ((unused)) = { __nan_bytes };

> Please fix this to use __unused__.
> 
> We should not use attributes that are in the user's namespace.

Pushed as commit 50022a93fcc36a0130b9f882709ff69f4b91c0cc:

	* sysdeps/ieee754/bits/nan.h [!__GNUC__] (__nan_union): Change
	__attribute__ ((unused)) to __attribute__ ((__unused__)).

ports/
	* sysdeps/mips/bits/nan.h [!__GNUC__] (__nan_union): Change
	__attribute__ ((unused)) to __attribute__ ((__unused__)).

diff --git ports/sysdeps/mips/bits/nan.h ports/sysdeps/mips/bits/nan.h
index 8f4666d..7aa157b 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__ ((unused)) = { __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 a1e6a51..935271a 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__ ((unused)) = { __nan_bytes };
+  __attribute__ ((__unused__)) = { __nan_bytes };
 # define NAN	(__nan_union.__d)
 
 #endif	/* GCC.  */


Grüße,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130220/17c87970/attachment.sig>


More information about the Libc-alpha mailing list