[RTEMS Project] #3397: The register keyword is deprecated in C++11

RTEMS trac trac at rtems.org
Mon Apr 16 05:22:14 UTC 2018


#3397: The register keyword is deprecated in C++11
------------------------------+-----------------------------
  Reporter:  Sebastian Huber  |      Owner:  Sebastian Huber
      Type:  defect           |     Status:  assigned
  Priority:  normal           |  Milestone:  5.1
 Component:  unspecified      |    Version:  5
  Severity:  normal           |   Keywords:
Blocked By:                   |   Blocking:
------------------------------+-----------------------------
 The following code gives a warning with GCC and -std=c++17:
 {{{
 void f(void)
 {
   register int i;
 }
 }}}
 {{{
 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;
                ^
 }}}
 Remove the use of the register keyword at least in the public header files
 for C++ compatibility.

--
Ticket URL: <http://devel.rtems.org/ticket/3397>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list