什么是“内联__attribute __((always_inline))”的功能,意味着什么? [英] what “inline __attribute__((always_inline))” means in the function?

查看:764
本文介绍了什么是“内联__attribute __((always_inline))”的功能,意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现下面的函数定义:

I have found the following function definition :

static inline __attribute__((always_inline)) int fn(const char *s)
{
  return (!s || (*s == '\0'));
}

和我想知道的含义在线__attribute __((always_inline))

推荐答案

它强制编译器内联即使优化是禁用的功能。检查本文档了解详情。

It forces the compiler to inline the function even if optimizations are disabled. Check this documentation for more information.

这篇关于什么是“内联__attribute __((always_inline))”的功能,意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆