#define _ARMABI __declspec(__nothrow)
2015-06-02 08:45
639 查看
#define _ARMABI __declspec(__nothrow)
extern _ARMABI void *memset(void * /*s*/, int /*c*/, size_t /*n*/) __attribute__((__nonnull__(1)));
关于keil代码的一段解释
__declspec
是C++的键字,它可以用来修饰函数
#define _ARMABI_NORETURN __declspec(__nothrow) __declspec(__noreturn)
定义了一个_ARMABI_NORETURN ,它是函数的修饰其中
nothrow :
格式:return-type __declspec(nothrow) [call-convention] function-name ([argument-list])
可用于函数声明。告诉编译器被声明的函数以及函数内部调用的其它函数都不会抛出异常。
noreturn :
一个函数被__declspec(noreturn)所修饰,那么它的含义是告诉编译器,这个函数不会返回,其结果是让编译器知道被修饰为__declspec(noreturn)的函数之后的代码不可到达。
如果编译器发现一个函数有无返回值的代码分支,编译器将会报C4715警告,或者C2202错误信息。如果这个代码分支是因为函数不会返回从而无法到达的话,可以使用约定__declspec(noreturn)来避免上述警告或者错误。
将一个期望返回的函数约定为__declspec(noreturn)将导致未定义的行为。
extern _ARMABI_NORETURN void __aeabi_assert(const char *, const char *, int) __attribute__((__nonnull__(1,2)));
相当与
extern __declspec(__nothrow) __declspec(__noreturn) void __aeabi_assert(const char *, const char *, int) __attribute__((__nonnull__(1,2)));
这个函数有三个修饰
__declspec(__nothrow)
__declspec(__noreturn)
void
extern _ARMABI void *memset(void * /*s*/, int /*c*/, size_t /*n*/) __attribute__((__nonnull__(1)));
关于keil代码的一段解释
__declspec
是C++的键字,它可以用来修饰函数
#define _ARMABI_NORETURN __declspec(__nothrow) __declspec(__noreturn)
定义了一个_ARMABI_NORETURN ,它是函数的修饰其中
nothrow :
格式:return-type __declspec(nothrow) [call-convention] function-name ([argument-list])
可用于函数声明。告诉编译器被声明的函数以及函数内部调用的其它函数都不会抛出异常。
noreturn :
一个函数被__declspec(noreturn)所修饰,那么它的含义是告诉编译器,这个函数不会返回,其结果是让编译器知道被修饰为__declspec(noreturn)的函数之后的代码不可到达。
如果编译器发现一个函数有无返回值的代码分支,编译器将会报C4715警告,或者C2202错误信息。如果这个代码分支是因为函数不会返回从而无法到达的话,可以使用约定__declspec(noreturn)来避免上述警告或者错误。
将一个期望返回的函数约定为__declspec(noreturn)将导致未定义的行为。
extern _ARMABI_NORETURN void __aeabi_assert(const char *, const char *, int) __attribute__((__nonnull__(1,2)));
相当与
extern __declspec(__nothrow) __declspec(__noreturn) void __aeabi_assert(const char *, const char *, int) __attribute__((__nonnull__(1,2)));
这个函数有三个修饰
__declspec(__nothrow)
__declspec(__noreturn)
void
相关文章推荐
- 转:关于keil中data,idata,xdata,pdata,code的问题
- OK2440的KEIL裸机调试心得
- Keil中build和rebuild区别
- NORDIC(一)Nordic_Keil的内存配置
- keil中编写arm代码堆栈的设置
- Keil中配置jLink烧写Flash
- MDK5.00中*** error 65: access violation at 0x40021000 : no 'read' permission的一种解决方法
- 解决mdk4.6以后出现Error: L6411E: No compatible library exists with a ...
- KEIL MDK 自定义工具时的命令行参数
- Keil生成Bin文件的方法
- keil中的 Use MicroLIB
- Keil C51 与 ARM 并存方法
- Eclipse + Keil + Jlink编译、调试
- 让ADS与KEIL共存 Warning: L6373W: libattrs.map file not found in System Library directory
- TQ2440 在Keil V5 MDK下创建工程 并 使用Jlink 在RAM调试 方法
- 模拟IIC总线汇编程序软件包
- keil 中常见的几种警告
- STM32F407学习之创建工程(KEIL-ARM)
- keil uvision4的两个小问题
- 记自己独立完成项目(取得进展)