From baa5874404351b606c29239606db00f8903e8ece Mon Sep 17 00:00:00 2001 From: synergydev Date: Sun, 6 Oct 2013 12:57:51 -0700 Subject: [PATCH] libc: Remove deprecated register In c++11, register has been deprecated, and libc is now built as gnu++11 From the documentation: A register specifier is a hint to the implementation that the variable so declared will be heavily used. [ Note: The hint can be ignored and in most implementations it will be ignored if the address of the variable is taken. This use is deprecated (see D.2) Change-Id: I459dc3f5f9de63fc09eeda3bc6700f31bdf20f6f --- libc/private/bionic_tls.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h index f7a90514e..2500d8842 100644 --- a/libc/private/bionic_tls.h +++ b/libc/private/bionic_tls.h @@ -89,13 +89,13 @@ extern int __set_tls(void* ptr); /* get the TLS */ #if defined(__arm__) # define __get_tls() \ - ({ register unsigned int __val; \ + ({ unsigned int __val; \ asm ("mrc p15, 0, %0, c13, c0, 3" : "=r"(__val)); \ (volatile void*) __val; }) #elif defined(__mips__) # define __get_tls() \ /* On mips32r1, this goes via a kernel illegal instruction trap that's optimized for v1. */ \ - ({ register unsigned int __val asm("v1"); \ + ({ unsigned int __val asm("v1"); \ asm (" .set push\n" \ " .set mips32r2\n" \ " rdhwr %0,$29\n" \ @@ -103,13 +103,13 @@ extern int __set_tls(void* ptr); (volatile void*) __val; }) #elif defined(__i386__) # define __get_tls() \ - ({ register void* __val; \ + ({ void* __val; \ asm ("movl %%gs:0, %0" : "=r"(__val)); \ (volatile void*) __val; }) #elif defined(__x86_64__) # define __get_tls() \ - ({ register void* __val; \ + ({ void* __val; \ asm ("mov %%fs:0, %0" : "=r"(__val)); \ (volatile void*) __val; }) #else