]> begriffs open source - cmsis/commit
Remove `register` keyword from public headers
authorFreddie Chopin <freddie.chopin@gmail.com>
Fri, 11 May 2018 20:39:05 +0000 (22:39 +0200)
committerJonatan Antoni <jonatan.antoni@arm.com>
Mon, 14 May 2018 08:09:36 +0000 (10:09 +0200)
commit6be3eca17498d0a0cc9108a28fd929baef68bf01
treeb221075a5b24732061e6b194baf3eac8ab95eaf8
parentc847da102574dceff5c6ca6626d87cf83211d6b0
Remove `register` keyword from public headers

In C++17 `register` keyword was removed. Current gcc 8.1.0 produces
following warning if `-std=c++17` flag is used:

warning: ISO C++17 does not allow 'register' storage class specifier
[-Wregister]

GCC almost completely ignores `register` keyword, with rare exception of
`-O0` when additional copy from/to stack may be generated.

For simplicity of the codebase it is better to just remove this
problematic keyword where it is not strictly required.

See: http://en.cppreference.com/w/cpp/language/storage_duration

Closes issue #345
CMSIS/Core/Include/cmsis_armclang.h
CMSIS/Core/Include/cmsis_gcc.h
CMSIS/Core/Include/core_cm7.h