From 8c62281f8b21f1e368a5e091331175f42f38e5fe Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Fri, 1 Nov 2019 03:49:03 +0000 Subject: [PATCH] Revert "Remove use of "register" keyword, deprecated in C++17" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 07411862eaa9a9a38e84caed2e97e836e456656f. 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 --- .../linux/minidump_writer/linux_dumper_unittest_helper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc b/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc index 2dfe09b6..3ad48e50 100644 --- a/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc +++ b/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc @@ -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;