https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100005

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Neither always_inline nor artificial attribute means that you can't take
addresses of those inlines, but
1) I don't think anything implies the intrinsics must be implemented as inline
functions, after all, gcc implements hundreds of intrinsics as preprocessor
macros e.g. at -O0
2) as those intrinsics that are implemented as inline functions are implemented
by gcc as
extern inline __attribute__((gnu_inline, artificial, always_inline)),
they have the GNU extern inline semantics, i.e. the header provides definitions
for inlining purposes and when it can't be inline, something different must
supply the definitions somewhere else (either the user, or perhaps GCC in some
library; but GCC doesn't do that).
Now, GCC could instead define them as static inline __attribute((artificial,
always_inline)) and then one would get an out of line copy when taking their
address, but it would duplicated in all the TUs that did this.

Anyway, your assumption that intrinsics can be used the way you expect them is
just wrong.

Reply via email to