[Rd] Build error with gcc 15
Iñaki Ucar
|uc@r @end|ng |rom |edor@project@org
Wed Jan 15 22:22:07 CET 2025
On Wed, 15 Jan 2025 at 20:29, Prof Brian Ripley <ripley using stats.ox.ac.uk> wrote:
>
> On 15/01/2025 16:06, Iñaki Ucar wrote:
> > Dear R Core,
> >
> > GCC 15 is already in Fedora rawhide, because it will be part of the next
> > release, Fedora 42. R 4.4.2 fails to build with the following error [1]:
> >
> >> sys-std.c:1189:1: warning: ‘noreturn’ attribute ignored [-Wattributes]
> >> 1189 | void Rstd_CleanUp(SA_TYPE saveact, int status, int runLast)
> >> | ^~~~
> >> sys-std.c:1189:1: error: expected identifier or ‘(’ before ‘void’
>
> You failed to say that GCC 15 defaults to C23 (and they have not yet
> documented that).
> >
> > I've seen some references to this in the source code, so this may be fixed
> > in R devel. If this is the case, it would be great if you could provide a
> > patch that I can apply to v4.4.2 until the next R release (or maybe I
> > should just specify an older C standard?).
>
> Look at the definition of NORET in R_ext/Error.h. You want r87411;
>
> r87411 | ripley | 2024-12-01 10:11:10 +0000 (Sun, 01 Dec 2024) | 1 line
>
> gcc pre-15 does not yet support [[noreturn]]
Thanks, that worked nicely. I'll apply it for now.
Best,
Iñaki
> GCC 15 is not even at RC stage, and this is one of many undocumented
> changes -- so they have not even got to the documentation-fixing stage.
> This is a GCC issue -- both LLVM and Apple clang build R-patched in C23
> mode.
>
> We will port this to R-patched, unless GCC 15 is fixed before its or
> R-patched's release.
>
> --
> Brian D. Ripley, ripley using stats.ox.ac.uk
> Emeritus Professor of Applied Statistics, University of Oxford
>
--
Iñaki Úcar
More information about the R-devel
mailing list