RTEMS | sparc/include/.../cpuimpl.h: Correct global file scope register use (!488)

Joel Sherrill (@joel) gitlab at rtems.org
Fri May 23 17:08:52 UTC 2025



Joel Sherrill created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/488

Project:Branches: joel/rtems:5250-spstdc17-sparc-warning-for-use-of to rtems/rtos/rtems:main
Author:   Joel Sherrill
Assignee: Joel Sherrill



## Summary

sparc/include/.../cpuimpl.h: Correct global file scope register use

The register keyword was never more than a suggestion but in more
recent versions of C and C++, it has been reduced to a reserved
keyword with no semantics. GCC has a documented extension for
global register variables. Add the __extension__ keyword to avoid
warnings.

See Issue #5250 for a more detailed discussion including a link
to a discussion on the GCC mailing list.

The use of g6 as a pointer to the per CPU information is documented
in the SPARC chapter of the CPU Supplement Guide.

Closes #5250.


<!-- Default settings, if it is a dropdown it will set after submission -->

Closes #5250

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/488
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250523/1eadba51/attachment.htm>


More information about the bugs mailing list