Hy,
i get two warnings from my c++-compiler (arm-none-eabi-g++ (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904) if I use the header cmsis_gcc.h in the NRF5 SDK 14.2.0 with C++17:
nrf_sdk-src/components/toolchain/cmsis/include/cmsis_gcc.h:150:21: error: ISO C++1z does not allow 'register' storage class specifier [-Wregister] register uint32_t result;
nrf_sdk-src/components/toolchain/cmsis/include/cmsis_gcc.h:175:21: warning: ISO C++1z does not allow 'register' storage class specifier [-Wregister] register uint32_t result;
It is clear, that you can supress the warning by adding the compiler flag -Wno-register, but since this keyword doesn't have any meaning in the C++ world, it may be better, to remove it completely or enable it only for C-compilers, if really needed.
Since according to http://en.cppreference.com/w/cpp/keyword/register, the register keyword doesn't have any meaning in C++ before version 17 and in C++17 and later it is marked as deprecated.
Therefore, it would be good, if it is removed, if the file is used in a C++-compiler to conform future standards, because the register keyword may be used in the future for other purposes.
Thanks.