[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Question on replacing macros with static inline functions
- From: William Ahern <william@...>
- Date: Thu, 17 Nov 2022 23:01:35 -0800
On Thu, Nov 17, 2022 at 04:35:32PM -0500, Andrew Cagney wrote:
> On Mon, 14 Nov 2022 at 11:49, Brent Pappas <firstname.lastname@example.org> wrote:
> > I see, that makes sense.
> > Thanks for the quick reply.
> I'd expect those macros to be around for some time:
> - GCC didn't adopt C99 inline semantics until GCC 4.3 and that was
> only released in 2008 https://gcc.gnu.org/gcc-4.3/
> https://gcc.gnu.org/gcc-4.3/porting_to.html ); sticking with macros
> avoids that compatibility headache
But `static inline' has always followed C99 semantics. That's one reason why
`static inline' is so common today, and common long before GCC switched the
default -std mode or fixed it's `extern inline' behavior.