A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01179.html below:

Re: Thoughts on replacing macros with static inline functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] From: Po Lu Subject: Re: Thoughts on replacing macros with static inline functions Date: Fri, 18 Nov 2022 14:27:09 +0800 User-agent: Gnus/5.13 (Gnus v5.13)
xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> Why do you not consider __attribute__((always_inline)) an improvement
> over macros where applicable?

And exactly where is __attribute__((always_inline)) present?  Only on
GCC, right?  What about Sun C, and other C99 compilers?

And how is an additional function an improvement over extremely trivial
macros, like these:

#define XM_DRAG_REASON(originator, code)        ((code) | ((originator) << 7))
#define XM_DRAG_REASON_ORIGINATOR(reason)       (((reason) & 0x80) ? 1 : 0)
#define XM_DRAG_REASON_CODE(reason)             ((reason) & 0x7f)

?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4