summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/sh/include/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-16 07:34:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-16 07:37:06 +0200
commitf35c3be9f8968daaa1b3e81808f9b99079d17a68 (patch)
treeadb84f327c8e50e83b2107d6539fa8fa3d5aca09 /cpukit/score/cpu/sh/include/rtems/score
parentlibdl: Fix the tests loading the correct files (diff)
downloadrtems-f35c3be9f8968daaa1b3e81808f9b99079d17a68.tar.bz2
Remove register keyword from public header files
The following code void f(void) { register int i; } gives a warning with GCC and -std=c++17 test.cc: In function ‘void f()’: test.cc:3:15: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister] register int i; ^ and clang with -std=c++14 test.cc:3:3: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] register int i; ^~~~~~~~~ 1 warning generated. Remove the use of the register keyword at least in the public header files for C++ compatibility. Close #3397.
Diffstat (limited to 'cpukit/score/cpu/sh/include/rtems/score')
-rw-r--r--cpukit/score/cpu/sh/include/rtems/score/sh.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/score/cpu/sh/include/rtems/score/sh.h b/cpukit/score/cpu/sh/include/rtems/score/sh.h
index 4e26478b8b..6ac5ef1382 100644
--- a/cpukit/score/cpu/sh/include/rtems/score/sh.h
+++ b/cpukit/score/cpu/sh/include/rtems/score/sh.h
@@ -170,7 +170,7 @@ extern "C" {
#define sh_get_interrupt_level( _level ) \
{ \
- register uint32_t _tmpsr ; \
+ uint32_t _tmpsr ; \
\
__asm__ volatile( "stc sr, %0" : "=r" (_tmpsr) ); \
_level = (_tmpsr & 0xf0) >> 4 ; \
@@ -178,7 +178,7 @@ extern "C" {
#define sh_set_interrupt_level( _newlevel ) \
{ \
- register uint32_t _tmpsr; \
+ uint32_t _tmpsr; \
\
__asm__ volatile ( "stc sr, %0" : "=r" (_tmpsr) ); \
_tmpsr = ( _tmpsr & ~0xf0 ) | ((_newlevel) << 4) ; \
@@ -194,7 +194,7 @@ static inline uint32_t sh_swap_u32(
uint32_t value
)
{
- register uint32_t swapped;
+ uint32_t swapped;
__asm__ volatile (
"swap.b %1,%0; "
@@ -210,7 +210,7 @@ static inline uint16_t sh_swap_u16(
uint16_t value
)
{
- register uint16_t swapped ;
+ uint16_t swapped ;
__asm__ volatile ( "swap.b %1,%0" : "=r" (swapped) : "r" (value) );