C标准库源码解剖(9)
56. ? __ASSERT_VOID_CAST (0) /
57. : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTI
ON))
58. # endif
59. /* 2.4及之后版本的GCC定义了一个魔术变量__PRETTY_FUNCTION__,它
包含当前定义的函数名,这在2.6版本之前
60. 的G++中打破了。C9x有一个类似的名为__func__的变量,但首选的是GCC
的这个变量,因为它重新覆盖了C++中的
61. 这个函数名 */
62. # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2,
4)
63. # define __ASSERT_FUNCTION __PRETTY_FUNCTION__
64. # else
65. # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
66. # define __ASSERT_FUNCTION __func__
67. # else
68. # define __ASSERT_FUNCTION ((__const char *) 0)
69. # endif
70. # endif
71. #endif /* NDEBUG. */


1. /* assert.c:assert功能的实现,核心的函数为__assert_fail */
2. #include <assert.h>
3. #include <libintl.h>
4. #include <stdio.h>
c标准库<assert.h>:诊断 <assert.h>中只定义了...<ctype.h>中定义的标准函数列 表如下: <ctype.h...Longjmp with value 1 一般地, setjmp 和 longjmp ...
c 语言函数库 第一章(C 标准库) 1. 2. 3. ...10 1. <assert.h>:诊断 <assert.h>中只定义了...Longjmp with value 1 一般地, setjmp 和 longjmp ...
诊断<assert.h>......信号处理<signal.h>......C 标准库函数,但没有列出一些用途有限的函数以及某些可以简单的从其 他函数合成的函数,也没有包含多字节和...
标准语言概述函数库简介 C语言标准库的历史 标准库...在C89标准中: <assert.h> <ctype.h> <errno.h...setjmp.h signal.h 嵌入式家园 www.embedclub.com...
表 9-1 标准库函数 <assert.h> <ctype.h> <...<signal.h> <stdarg.h> <stddef.h> <stdio.h...<setjmp.h>中定义了两个宏: int setjmp(jmp_buf...
c语言函数库-第一章(C标准库)_IT/计算机_专业...10 1. <assert.h>:诊断 : <assert.h>中只定义...Longjmp with value 1 一般地, setjmp 和 longjmp ...
C标准库函数集(头文件索引)_IT/计算机_专业资料...诊断<assert.h>......8.1 setjmp #include <setjmp.h> int setjmp(jmp_buf env); setjmp()宏把...
<assert.h>:诊断 <assert.h>中只定义了一个带参...<setjmp.h>中定义了两个宏: int setjmp(jmp_buf...在<signal.h>中只定义了两个函数: int signal(...
热门文档