[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Thoughts on replacing macros with static inline functions
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)
?
- Thoughts on replacing macros with static inline functions, Brent Pappas, 2022/11/14
- Re: Thoughts on replacing macros with static inline functions, Eli Zaretskii, 2022/11/15
- Re: Thoughts on replacing macros with static inline functions, Richard Stallman, 2022/11/18
- Re: Thoughts on replacing macros with static inline functions, Eli Zaretskii, 2022/11/18
- Re: Thoughts on replacing macros with static inline functions, xenodasein, 2022/11/18
- Re: Thoughts on replacing macros with static inline functions, Po Lu, 2022/11/18
- Re: Thoughts on replacing macros with static inline functions, Eli Zaretskii, 2022/11/18
- Re: Thoughts on replacing macros with static inline functions, tomas, 2022/11/18
- Re: Thoughts on replacing macros with static inline functions, xenodasein, 2022/11/18
- Re: Thoughts on replacing macros with static inline functions, Stefan Monnier, 2022/11/18
- Re: Thoughts on replacing macros with static inline functions, Dr. Arne Babenhauserheide, 2022/11/18