diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-04-16 07:34:18 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-04-16 07:37:06 +0200 |
commit | f35c3be9f8968daaa1b3e81808f9b99079d17a68 (patch) | |
tree | adb84f327c8e50e83b2107d6539fa8fa3d5aca09 /cpukit/score/cpu/i386/include/rtems/score/cpu.h | |
parent | 696b9121a2b7ec80464d13c723e6c780a3e5608c (diff) |
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/i386/include/rtems/score/cpu.h')
-rw-r--r-- | cpukit/score/cpu/i386/include/rtems/score/cpu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/score/cpu/i386/include/rtems/score/cpu.h b/cpukit/score/cpu/i386/include/rtems/score/cpu.h index 777439c6e0..42958c00f0 100644 --- a/cpukit/score/cpu/i386/include/rtems/score/cpu.h +++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h @@ -522,8 +522,8 @@ extern void _CPU_Fatal_halt(uint32_t source, uint32_t error) #define _CPU_Bitfield_Find_first_bit( _value, _output ) \ { \ - register uint16_t __value_in_register = ( _value ); \ - uint16_t __output = 0; \ + uint16_t __value_in_register = ( _value ); \ + uint16_t __output = 0; \ __asm__ volatile ( "bsfw %0,%1 " \ : "=r" ( __value_in_register ), "=r" ( __output ) \ : "0" ( __value_in_register ), "1" ( __output ) \ |