Revert "Remove use of "register" keyword, deprecated in C++17"

This reverts commit 07411862ea.

We were a bit overzealous in removing “register” here. Both clang and
GCC correctly disallow “register” as a storage class specifier in C++17
mode by producing an error in ordinary use. However, they require
“register” to be specified for explicit register variables, and do not
produce an error in this case.

Change-Id: I223f2652c6da4215d6e8788d902e767c94b8c29d
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1894875
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Mark Mentovai 2019-11-01 03:49:03 +00:00
parent 5085b1d0df
commit 8c62281f8b

View File

@ -65,7 +65,7 @@ void *thread_function(void *data) {
perror("ERROR: parent notification failed");
return NULL;
}
volatile pid_t *thread_id_ptr asm(TID_PTR_REGISTER) = thread_id;
register volatile pid_t *thread_id_ptr asm(TID_PTR_REGISTER) = thread_id;
while (true)
asm volatile ("" : : "r" (thread_id_ptr));
return NULL;