Index | Thread | Search

From:
Josh Rickmar <jrick@zettaport.com>
Subject:
Re: flintlib: use proper C23 statement for noreturn
To:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Cc:
ports@openbsd.org
Date:
Mon, 17 Nov 2025 09:41:06 -0500

Download raw body.

Thread
On Mon, Nov 17, 2025 at 09:27:56AM -0500, Josh Rickmar wrote:
> On Mon, Nov 17, 2025 at 02:21:29PM +0100, Claudio Jeker wrote:
> > In C23 the noreturn attribute for functions needs [[ ]] to work.
> > At least gcc15 in c23 mode trips over this.
> 
> ok

It looks like this fix is already upstreammed, and we should just
update the port instead.

https://github.com/flintlib/flint/commit/ee516836e58327310ca58f10f71ae8873b0320e0

> 
> > 
> > -- 
> > :wq Claudio
> > 
> > 
> > Index: patches/patch-src_flint_h
> > ===================================================================
> > RCS file: patches/patch-src_flint_h
> > diff -N patches/patch-src_flint_h
> > --- /dev/null	1 Jan 1970 00:00:00 -0000
> > +++ patches/patch-src_flint_h	30 Oct 2025 15:07:01 -0000
> > @@ -0,0 +1,14 @@
> > +In C23 noreturn is actually spelled [[noreturn]]
> > +
> > +Index: src/flint.h
> > +--- src/flint.h.orig
> > ++++ src/flint.h
> > +@@ -146,7 +146,7 @@ typedef struct __FLINT_FILE FLINT_FILE;
> > + #elif __STDC_VERSION__ < 202300L
> > + # define FLINT_NORETURN _Noreturn
> > + #else
> > +-# define FLINT_NORETURN noreturn
> > ++# define FLINT_NORETURN [[noreturn]]
> > + #endif
> > + 
> > + #if FLINT_USES_TLS
>