Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2025 11:11:39 -0700
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: a question about style(9) and inline
Message-ID:  <aJzVW5aGjtQN1RSP@troutmask.apl.washington.edu>
In-Reply-To: <BD04F41E-3D5C-4F48-B99A-8DD493ED0C45@FreeBSD.org>
References:  <aJzL8JUop1vDFPNJ@troutmask.apl.washington.edu> <BD04F41E-3D5C-4F48-B99A-8DD493ED0C45@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

On Wed, Aug 13, 2025 at 07:48:00PM +0200, Dimitry Andric wrote:
> On 13 Aug 2025, at 19:31, Steve Kargl <sgk@troutmask.apl.washington.edu> wrote:
> > 
> > In looking at lib/msun/math_private, one finds
> > 
> > static __inline float complex
> > static __inline double complex
> > static __inline long double complex
> > static inline double
> > static inline float
> > static inline long double
> > static __inline int
> > static __inline int
> > static __inline int
> > static inline int32_t
> > static inline int32_t
> > 
> > style(9) seems to not contain any preference with respect
> > to __inline versus inline.  As a matter of consistency,
> > I would like to use whatever is the preferred keyword.
> > So, which should be used?
> 
> In <sys/cdefs.h>, __inline is defined such that the keyword is removed
> if the compiler doesn't support it. I doubt it is possible to compile
> FreeBSD which such a compiler, so the whole __inline define now seems
> only necessary for backwards compatibility's sake. Since plain inline is
> already used in libm, it does not really make sense to use __inline
> anymore, in my opinion.

cdefs.h was removed from all msun sources except x86/fenv.h 
(circa 2024).  AFAICT, cdefs.h is not needed in x86/fenv.h.  
Following Warner's email, I'll use inline and clean up 
math_private.h.

-- 
Steve


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aJzVW5aGjtQN1RSP>