__attribute_unused__和__attribute_used__的作用
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
在Linux上这样的定义如下:
#define __attribute_used__ __attribute__((__used__))
#define __attribute_unused__ __attribute__((__unused__))
在gcc手册中找到了有关的解释:
unused:This attribute, attached to a function, means that the function is meant to be
possibly unused. GCC will not produce a warning for this function.
表示该函数或变量可能不使用,这个属性可以避免编译器产生警告信息。
===============================================================================
used: This attribute, attached to a function, means that code must be emitted for the
function even if it appears that the function is not referenced. This is useful,
for example, when the function is referenced only in inline assembly.
向编译器说明这段代码有用,即使在没有用到的情况下编译器也不会警告!
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献6条内容
所有评论(0)