GCC编译inline函数
来源:互联网 发布:游乐场软件 编辑:程序博客网 时间:2024/05/16 06:11
GCC来编译包含inline函数的头文件gestalt.h,具体包含以下几个inline函数:
static inline int gestalt_test_bit (int nr, volatile void * addr)
{
return test_bit(GESTALT_BITMAP_SHIFT(nr), &(GESTALT_BITMAP_ENTRY(nr, addr)));
}
static inline void gestalt_clear_bit (int nr, volatile void * addr)
{
clear_bit(GESTALT_BITMAP_SHIFT(nr), &(GESTALT_BITMAP_ENTRY(nr, addr)));
}
static inline void gestalt_set_bit ( int nr, volatile void * addr)
{
set_bit(GESTALT_BITMAP_SHIFT(nr), &(GESTALT_BITMAP_ENTRY(nr, addr)));
}
static inline int gestalt_test_and_set_bit (int nr, volatile void *addr)
{
return test_and_set_bit(GESTALT_BITMAP_SHIFT(nr), &(GESTALT_BITMAP_ENTRY(nr, addr)));
}
static inline int gestalt_test_and_clear_bit (int nr, volatile void *addr)
{
return test_and_clear_bit(GESTALT_BITMAP_SHIFT(nr), &(GESTALT_BITMAP_ENTRY(nr, addr)));
}
出现如下错误:
public/gestalt.h:61: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
public/gestalt.h:66: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
public/gestalt.h:71: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
public/gestalt.h:76: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
public/gestalt.h:88: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
解决方法:
如果gcc的选项中有-ansi 选项,则去掉-ansi 或者使用-ansi -std=gnu99来代替-ansi。
It should probably stop using -ansi as there are other occurences of the inline
keyword in xine headers.
- GCC编译inline函数
- Gcc Inline 函数
- 理解GCC中的inline函数
- gcc之inline函数探究
- 防止gcc -O3 强制 inline一个函数
- gcc 编译器对 inline 函数的支持
- gcc inline
- 宏条件编译和内联函数inline
- C++中如何强制inline函数(MSVC, GCC)
- [编译环境][gcc]内联函数
- GCC-Inline-Assembly-HOWTO
- GCC and C99 inline
- GCC-Inline-Assembly
- GCC ARM-inline-asm
- GCC Inline Assembly-HOWTO
- GCC and C99 inline .
- GCC and C99 inline
- GCC 中的inline关键字
- C#从DLL中提取资源
- eWebeditor编辑器使用方法
- 何去何从
- Complex 赋值
- 学生学不好,谁之责?
- GCC编译inline函数
- 各大浏览器 CSS3 和 HTML5 兼容速查表
- 观察者模式(Observer)
- 文档的当前编码不能保存文档内所有字符,需要改为UTF-8或者其他支持本文当中的特殊字符的编码
- 人民币存款利率
- ubuntu安装时出现BusyBox问题解决
- 《公正:该如何做是好?》(Justice: What's the Right Thing to Do? )【youtube上最受欢迎讲座】【哈佛大学最受新生喜爱公共课】【更新BBC里斯讲座】
- 运行时类型识别( R T T I )
- dll使用全局变量的疑问