RTEMS | spstdc17 SPARC warning for use of (#5250)
Joel Sherrill (@joel)
gitlab at rtems.org
Thu May 22 23:53:20 UTC 2025
Joel Sherrill created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5250
Assignee: Joel Sherrill
## Summary
spstdc17 triggers this warning for [cpuimpl.h:220](https://gitlab.rtems.org/rtems/rtos/rtems/-/blame/main/cpukit/score/cpu/sparc/include/rtems/score/cpuimpl.h?ref_type=heads#L220).
```
In file included from ../../../cpukit/include/rtems/score/percpu.h:43,
from ../../../cpukit/include/rtems/score/threaddispatch.h:41,
from ../../../testsuites/support/include/tmacros.h:50,
from ../../../testsuites/sptests/spstdc17/init.c:34:
../../../cpukit/score/cpu/sparc/include/rtems/score/cpuimpl.h:220:17: warning: file-scope declaration of '_SPARC_Per_CPU_current' specifies 'register' [-Wpedantic]
220 | register struct Per_CPU_Control *_SPARC_Per_CPU_current asm( "g6" );
| ^~~~~~~
```
Discussion in weekly meeting resulted in general consensus that the register keyword was never more than a hint at block scope level. It has not meaning at the file scope level. Moreover, the register keyword has been eliminated in later versions of both C and C++. See [CPP Reference](https://en.cppreference.com/w/c/language/storage_duration).
Recommended fix for this warning is to remove the register keyword.
### Pre-set options
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5250
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/20250522/ef7063f8/attachment-0001.htm>
More information about the bugs
mailing list