Bug 2336256
| Summary: | R fails to build with GCC 15 (C23 noreturn issues?) | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dave Malcolm <dmalcolm> |
| Component: | R | Assignee: | Tom "spot" Callaway <spotrh> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | i.ucar86, jakub, r-maint-sig, spotrh |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-01-15 21:29:07 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2333037 | ||
|
Description
Dave Malcolm
2025-01-07 22:03:17 UTC
Looking at https://svn.r-project.org/R/trunk/src/unix/sys-std.c the context seems to be: /* R_CleanUp is invoked at the end of the session to give the user the option of saving their data. If ask == SA_SAVEASK the user should be asked if possible (and this option should not occur in non-interactive use). If ask = SA_SAVE or SA_NOSAVE the decision is known. If ask = SA_DEFAULT use the SaveAction set at startup. In all these cases run .Last() unless quitting is cancelled. If ask = SA_SUICIDE, no save, no .Last, possibly other things. */ attribute_hidden NORET void Rstd_CleanUp(SA_TYPE saveact, int status, int runLast) { I'm guessing that "attribute_hidden" is defined in https://svn.r-project.org/R/trunk/src/include/Defn.h which has: #ifdef HAVE_VISIBILITY_ATTRIBUTE # define attribute_visible __attribute__ ((visibility ("default"))) # define attribute_hidden __attribute__ ((visibility ("hidden"))) #else # define attribute_visible # define attribute_hidden #endif but I wasn't able to find a definition of "NORET". Or maybe something else is going wrong. Upstream is aware of this AFAICT (see e.g. https://github.com/search?q=repo%3Awch%2Fr-source%20gcc%2015&type=code). So they will likely solve this in the next release. I think GCC in this spot only handles C23 attributes before GNU attributes, not the other way around, so
NORET attribute_hidden
void Rstd_CleanUp(SA_TYPE saveact, int status, int runLast)
{
would be ok but
attribute_hidden NORET
void Rstd_CleanUp(SA_TYPE saveact, int status, int runLast)
{
is not.
And isn't this a GCC issue? Anyway, upstream provided a patch for now. Closing here. As clarified by C FE maintainer, it is intentional that way. __attribute__ is a GNU extension and its placement is generally more forgiving, while the C23 standard clearly specifies where in the grammar they can appear and what they appertain to in each of those cases. |