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/riscv/include | |
parent | libdl: Fix the tests loading the correct files (diff) | |
download | rtems-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/riscv/include')
-rw-r--r-- | cpukit/score/cpu/riscv/include/rtems/score/cpu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h index ada46ef9ee..6f286e0bd8 100644 --- a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h +++ b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h @@ -158,7 +158,7 @@ Context_Control_fp _CPU_Null_fp_context; static inline unsigned long riscv_interrupt_disable( void ) { - register unsigned long status = read_csr(mstatus); + unsigned long status = read_csr(mstatus); clear_csr(mstatus, MSTATUS_MIE); return status; } |