#3397: The register keyword is deprecated in C++11
 Reporter:  Sebastian Huber  |       Owner:  Sebastian Huber
     Type:  defect           |      Status:  closed
 Priority:  normal           |   Milestone:  5.1
Component:  unspecified      |     Version:  5
 Severity:  normal           |  Resolution:  fixed
 Keywords:                   |  Blocked By:
 Blocking:                   |
Changes (by Sebastian Huber <sebastian.huber@…>):

 * status:  assigned => closed
 * resolution:   => fixed


 In [changeset:"f35c3be9f8968daaa1b3e81808f9b99079d17a68/rtems"
 #!CommitTicketReference repository="rtems"
 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.

Ticket URL: <http://devel.rtems.org/ticket/3397#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
bugs mailing list

Reply via email to