U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(9):bool的问题
来源:互联网 发布:上海房产中介排名 知乎 编辑:程序博客网 时间:2024/05/05 16:46
在u-boot/include/asm/posix_type.h中有这样一个定义:
typedef enum { false = 0, true = 1 } bool;
但是在VDSP5中将引起一个错误:
"../../include/asm/posix_types.h", line 63: cc0040: error: expected an
identifier
typedef enum { false = 0, true = 1 } bool;
因为VDSP5是将false和true做为内置类型来处理的:
The bool, true, and false keywords are extensions that support the C++ boolean type in C mode. The bool keyword is a unique signed integral type, just as the wchar_t is a unique unsigned type. There are two built-in constants of this type: true and false. When converting a numeric or pointer value to bool, a zero value becomes false, and a nonzero value becomes true. A bool value may be converted to int by promotion, taking true to one and false to zero. A numeric or pointer value is converted automatically to bool when needed.
These keyword extensions behave as if the declaration that follows had appeared at the beginning of the file, except that assigning a nonzero integer to a bool type causes it to take on the value true.
typedef enum { false, true } bool;
所以重新定义bool就是画蛇添足了,直接注释掉。
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(9):bool的问题
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(4):提示信息
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(5):ENDPROC
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(10):__xchg
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(11):bsz
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(13):使用L1
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(15):DECLARE_GLOBAL_DATA_PTR
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(16):*cplb_add
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(17): Entry.h
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(18):const
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(19):分号惹祸
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(21):收工
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(6):使用u-boot的crt代码
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(7):改造u-boot.lds.s
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录:#if
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(2): .macro
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(3): 汇编空语句
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录:全文
- OSCache 的缓冲技术在JSP页面中的使用
- 解析“extern” - keen的专栏 - CSDNBlog
- PreparedStatement与Statement区别
- 收录的好的文章,不断扩充中
- 域控制器域服务器AD服务器
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(9):bool的问题
- 读写文件函数ReadFile和WriteFile解析
- 关于使用牛顿迭代法和二分法解方程的算法说明
- Q版京剧脸谱来喽——状元
- 程序员怎样找到自己的核心竞争力
- CodProject.com上的一些好代码
- java mail
- 汉字的unicode码范围
- [数据库使用技巧]动态生成sql语句_网络大本营