================================
Author: taoyuetao
Email:
tao_yuetao@yahoo.com.cn
Blog: taoyuetao.cublog.cn
================================
在分析
[url=javascript:;]linux[/url]
内核时注意到有些函数会有添加__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.

表示该函数或变量可能不使用,这个属性可以避免编译器产生警告信息。

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/31100/showart_240177.html

有关gcc的扩展__attribute__((unused))的更多相关文章

  1. GCC扩展 __attribute__ ((visibility("hidden")))

    试想这样的情景,程序调用某函数A,A函数存在于两个动态链接库liba.so,libb.so中,并且程序执行需要链接这两个库,此时程序调用的A函数到底是来自于a还是b呢? 这取决于链接时的顺序,比如先链 ...

  2. c++之__attribute__((unused))

    转自https://blog.csdn.net/u013083059/article/details/19342935 内核时注意到有些函数会有添加__attribute__((unused)), 在 ...

  3. __attribute__((unused))

    在gcc手册中找到了有关的解释: unused:This attribute, attached to a function, means that the function is meant to ...

  4. RPM安装gcc gcc-c++扩展

    rpm -ivh cpp--.el5.i386.rpm 回车 rpm -ivh kernel-headers--.el5.i386.rpm 回车 rpm -ivh glibc-headers-.i38 ...

  5. C 语言的 GCC 扩展

    GNU 编译器(GCC)提供了很多 C 语言扩展,编译器会使用该信息生成更高效的机器代码. 内联函数 static inline __attribute__ ((always_inline)) int ...

  6. gcc __attribute__关键字举例之visibility【转】

    转自:https://blog.csdn.net/starstarstone/article/details/7493144?utm_source=tuicool&utm_medium=ref ...

  7. 利用gcc的__attribute__编译属性section子项构建初始化函数表【转】

    转自:https://my.oschina.net/u/180497/blog/177206 gcc的__attribute__编译属性有很多子项,用于改变作用对象的特性.这里讨论section子项的 ...

  8. GNU C 扩展(转)

    GNU CC 是一个功能非常强大的跨平台 C 编译器,它对 C 语言提供了很多扩展,这些扩展对优化.目标代码布局.更安全的检查等方面提供了很强的支持.这里对支持支持 GNU 扩展的 C 语言成为 GN ...

  9. Linux 内核使用的 GNU C 扩展

    gcc核心扩展linuxforum(转)=========================== Linux 内核使用的 GNU C 扩展 =========================== GNC ...

随机推荐

  1. WIN32api总结

    1.鼠标操作: win32api.SetCursorPos((101,156)) win32api.mouse_event(win32con.MOUSEEVENT_LEFTDOWN,0,0,0,0) ...

  2. DB天气app冲刺第四天

    今天卡壳了 做得很慢.. 明天继续 换一种思路试一下吧..

  3. Firefly是什么?有什么特点?

    原地址:http://bbs.gameres.com/forum.php?mod=viewthread&tid=219285 Firefly是免费.开源.稳定.快速扩展.能 “热更新”的分布式 ...

  4. FastCGI中文规范

    http://fuzhong1983.blog.163.com/blog/static/1684705201051002951763/ . 介绍 FastCGI是对CGI的开放的扩展,它为所有因特网应 ...

  5. 一些有用的webservice

    http://developer.51cto.com/art/200908/147125.htm 下面总结了一些常用的Web Service,是平时乱逛时收集的,希望对大家有用. ========== ...

  6. 李洪强iOS开发之提交AppStory时候遇到的坑

    今天我在上传AppStore的时候,遇到了很多的问题.一直找不到问题的原因,但是最后终于发现问题的原因 ,是因为钥匙串签名无效的问题,解决方案如下: 证书签名无效解决: 1,按照你那个链接下载,htt ...

  7. iis下设置默认页

    IIS设置设默认页 计算机-->右键管理-->服务器和应用程序-->Internet信息服务 -->网站-->你发布的网站名-->功能视图-->IIS大类里- ...

  8. misc_register、 register_chrdev 的区别总结

    参考: http://longer.spaces.eepw.com.cn/articles/article/item/60415 http://imganquan.org/blog/?p=350 网上 ...

  9. WCF - Overview

    WCF stands for Windows Communication Foundation. The elementary feature of WCF is interoperability. ...

  10. phpstrom 与 xdebug 配合实现PHP单步调试

    不说废话,直接开始. 第一步: 安装并配置xdebug 安装 可以从官网直接下载对应php版本的xdebug,下载地址:  https://xdebug.org/download.php 配置,典型的 ...