diff mbox

libgcc: Don't use "unused" in gthr-single.h

Message ID 412f749ad6a8a240748a580e7f01fb641be5ce44.1424657530.git.segher@kernel.crashing.org
State New
Headers show

Commit Message

Segher Boessenkool Feb. 23, 2015, 2:28 a.m. UTC
Header files shouldn't use identifiers in the application namespace.
gth-single.h does however; this makes the libstdc++ testsuite
all_attributes.cc fail for targets without software threads.

Is this okay for mainline?  And 4.9, 4.8?


Segher


2015-02-22  Segher Boessenkool  <segher@kernel.crashing.org>

libgcc/
	* gthr-single.h: Use __unused__ instead of unused.

---
 libgcc/gthr-single.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jack Howarth Feb. 23, 2015, 3:17 a.m. UTC | #1
This change has already been proposed as part of a more extensive fix
in https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00775.html.

On Sun, Feb 22, 2015 at 9:28 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> Header files shouldn't use identifiers in the application namespace.
> gth-single.h does however; this makes the libstdc++ testsuite
> all_attributes.cc fail for targets without software threads.
>
> Is this okay for mainline?  And 4.9, 4.8?
>
>
> Segher
>
>
> 2015-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
>
> libgcc/
>         * gthr-single.h: Use __unused__ instead of unused.
>
> ---
>  libgcc/gthr-single.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libgcc/gthr-single.h b/libgcc/gthr-single.h
> index f084fe2..bddded4 100644
> --- a/libgcc/gthr-single.h
> +++ b/libgcc/gthr-single.h
> @@ -38,7 +38,7 @@ typedef int __gthread_recursive_mutex_t;
>  #define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
>  #define __GTHREAD_RECURSIVE_MUTEX_INIT 0
>
> -#define UNUSED __attribute__((unused))
> +#define UNUSED __attribute__((__unused__))
>
>  #ifdef _LIBOBJC
>
> --
> 1.8.1.4
>
Segher Boessenkool Feb. 23, 2015, 7:16 a.m. UTC | #2
On Sun, Feb 22, 2015 at 10:17:50PM -0500, Jack Howarth wrote:
> This change has already been proposed as part of a more extensive fix
> in https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00775.html.

Ah, excellent.  Somehow I saw the darwin thing but missed this one.
Let's call this a ping of that patch then :-)


Segher
diff mbox

Patch

diff --git a/libgcc/gthr-single.h b/libgcc/gthr-single.h
index f084fe2..bddded4 100644
--- a/libgcc/gthr-single.h
+++ b/libgcc/gthr-single.h
@@ -38,7 +38,7 @@  typedef int __gthread_recursive_mutex_t;
 #define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
 #define __GTHREAD_RECURSIVE_MUTEX_INIT 0
 
-#define UNUSED __attribute__((unused))
+#define UNUSED __attribute__((__unused__))
 
 #ifdef _LIBOBJC