解决gcc报错:error: implicit declaration of function ‘inet_addr’ [-Werror=implicit-function-declaration]

本文解决了在使用GCC编译时遇到的隐式函数声明错误问题,如socket、inet_addr等,通过正确声明函数或引入相应的头文件可以避免此类警告。

此文首发于我的个人博客:解决gcc报错 error implicit declaration of function ‘inet_addr’ [-Werror=implicit-function-declaration] — zhang0peter的个人博客


下午在写代码编译时报了如下这些错:

/home/mininet/openvswitch-2.10.1/datapath/linux/datapath.c:239:1: error: implicit declaration of function ‘socket’ [-Werror=implicit-function-declaration]
 int sock_cli = socket(AF_INET,SOCK_STREAM, 0);
 ^
/home/mininet/openvswitch-2.10.1/datapath/linux/datapath.c:245:5: error: implicit declaration of function ‘inet_addr’ [-Werror=implicit-function-declaration]
     servaddr.sin_addr.s_addr = inet_addr("127.0.0.1");  
     ^
/home/mininet/openvswitch-2.10.1/datapath/linux/datapath.c:246:5: error: implicit declaration of function ‘connect’ [-Werror=implicit-function-declaration]
     if (connect(sock_cli, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0)
     ^
/home/mininet/openvswitch-2.10.1/datapath/linux/datapath.c:248:9: error: implicit declaration of function ‘perror’ [-Werror=implicit-function-declaration]
         perror("connect error!");
         ^
/home/mininet/openvswitch-2.10.1/datapath/linux/datapath.c:250:4: error: implicit declaration of function ‘send’ [-Werror=implicit-function-declaration]
    if(send(sock_cli, skb->data,skb->tail-skb->data ,0)<0){

我的函数是没问题的,问题是我调用了未声明的函数,也就是说编译器不知道这个函数的返回值和参数列表
需要在前面加个函数声明就可以了,或者在对于的.h文件中增加函数声明。

src/cliDnsProxyHandlers.c: In function ‘cli_dnsproxy_dot_add_entry’: src/cliDnsProxyHandlers.c:937:5: error: implicit declaration of function ‘cli_set_mode’; did you mean ‘cli_setWanMode’? [-Werror=implicit-function-declaration] cli_set_mode(pCliEnv, MODE_CONFIG_DOT_ADD); ^~~~~~~~~~~~ cli_setWanMode src/cliDnsProxyHandlers.c:937:27: error: ‘MODE_CONFIG_DOT_ADD’ undeclared (first use in this function); did you mean ‘EM_CONFIG_DATA’? cli_set_mode(pCliEnv, MODE_CONFIG_DOT_ADD); ^~~~~~~~~~~~~~~~~~~ EM_CONFIG_DATA src/cliDnsProxyHandlers.c:937:27: note: each undeclared identifier is reported only once for each function it appears in src/cliDnsProxyHandlers.c:938:5: error: implicit declaration of function ‘RCC_EXT_WritePrompt’; did you mean ‘RCC_EXT_WriteStrLine’? [-Werror=implicit-function-declaration] RCC_EXT_WritePrompt(pCliEnv, "(config-dot-add)# "); ^~~~~~~~~~~~~~~~~~~ RCC_EXT_WriteStrLine src/cliDnsProxyHandlers.c: In function ‘cli_dot_add_commit’: src/cliDnsProxyHandlers.c:1045:9: error: implicit declaration of function ‘dmDotCfgServerRefreshCache’; did you mean ‘dmDotCfgServerKeyGetById’? [-Werror=implicit-function-declaration] dmDotCfgServerRefreshCache(); ^~~~~~~~~~~~~~~~~~~~~~~~~~ dmDotCfgServerKeyGetById src/cliDnsProxyHandlers.c:1048:31: error: ‘MODE_CONFIG_DOT’ undeclared (first use in this function); did you mean ‘EM_CONFIG_DATA’? cli_set_mode(pCliEnv, MODE_CONFIG_DOT); ^~~~~~~~~~~~~~~ EM_CONFIG_DATA src/cliDnsProxyHandlers.c:1057:14: error: ‘ERR_DUPLICATE’ undeclared (first use in this function) case ERR_DUPLICATE: error_msg = "Duplicate server name"; break; ^~~~~~~~~~~~~ src/cliDnsProxyHandlers.c:1059:14: error: ‘ERR_MAX_LIMIT’ undeclared (first use in this function); did you mean ‘ERR_MAD_START’? case ERR_MAX_LIMIT: error_msg = "Maximum servers reached"; break; ^~~~~~~~~~~~~ ERR_MAD_START
10-25
添加前报错ANALIZE.c:182:12: error: implicit declaration of function 'inet_aton'; did you mean 'inet_pton'? [-Werror=implicit-function-declaration] 182 | if (-1 == inet_aton(pStrAddr, &in)) | ^~~~~~~~~ | inet_pton ANALIZE.c:182:12: error: nested extern declaration of 'inet_aton' [-Werror=nested-externs] In file included from /home/tplink/code/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/arm-buildroot-linux-gnueabi/sysroot/usr/include/arpa/inet.h:22, from ../include_priv/ANALIZE.h:23, from ANALIZE.c:16: ANALIZE.c: In function 'getSubNetFromV6PubPreix': ANALIZE.c:267:36: error: 'struct in6_addr' has no member named 's6_addr32' 267 | *v4PubSubNet |= ((htonl(pIn6Addr->s6_addr32[idx]) >> (31 - bitDex)) & 0x01); | ^~ In file included from ../include_priv/map.h:21, from ../include_priv/dm_map.h:18, from ANALIZE.c:18: ANALIZE.c: In function 'getWanIPv6Addr': ANALIZE.c:402:10: error: 'struct in6_addr' has no member named 's6_addr16' 402 | in6Addr->s6_addr16[0], in6Addr->s6_addr16[1], | ^~ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:402:33: error: 'struct in6_addr' has no member named 's6_addr16' 402 | in6Addr->s6_addr16[0], in6Addr->s6_addr16[1], | ^~ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:403:10: error: 'struct in6_addr' has no member named 's6_addr16' 403 | in6Addr->s6_addr16[2], in6Addr->s6_addr16[3], | ^~ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:403:33: error: 'struct in6_addr' has no member named 's6_addr16' 403 | in6Addr->s6_addr16[2], in6Addr->s6_addr16[3], | ^~ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:404:10: error: 'struct in6_addr' has no member named 's6_addr16' 404 | in6Addr->s6_addr16[4], in6Addr->s6_addr16[5], | ^~ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:404:33: error: 'struct in6_addr' has no member named 's6_addr16' 404 | in6Addr->s6_addr16[4], in6Addr->s6_addr16[5], | ^~ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:405:10: error: 'struct in6_addr' has no member named 's6_addr16' 405 | in6Addr->s6_addr16[6], in6Addr->s6_addr16[7]); | ^~ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:405:33: error: 'struct in6_addr' has no member named 's6_addr16' 405 | in6Addr->s6_addr16[6], in6Addr->s6_addr16[7]); | ^~ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c: In function 'genIpv6PublicAddr': ANALIZE.c:429:9: error: 'struct in6_addr' has no member named 's6_addr32' 429 | in6Addr.s6_addr32[2] = 0; | ^ ANALIZE.c:430:9: error: 'struct in6_addr' has no member named 's6_addr32' 430 | in6Addr.s6_addr32[3] = 0; | ^ In file included from ../include_priv/map.h:21, from ../include_priv/dm_map.h:18, from ANALIZE.c:18: ANALIZE.c:442:10: error: 'struct in6_addr' has no member named 's6_addr16' 442 | in6Addr.s6_addr16[0], in6Addr.s6_addr16[1], | ^ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:442:32: error: 'struct in6_addr' has no member named 's6_addr16' 442 | in6Addr.s6_addr16[0], in6Addr.s6_addr16[1], | ^ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:443:10: error: 'struct in6_addr' has no member named 's6_addr16' 443 | in6Addr.s6_addr16[2], in6Addr.s6_addr16[3], | ^ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:443:32: error: 'struct in6_addr' has no member named 's6_addr16' 443 | in6Addr.s6_addr16[2], in6Addr.s6_addr16[3], | ^ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:444:10: error: 'struct in6_addr' has no member named 's6_addr16' 444 | in6Addr.s6_addr16[4], in6Addr.s6_addr16[5], | ^ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:444:32: error: 'struct in6_addr' has no member named 's6_addr16' 444 | in6Addr.s6_addr16[4], in6Addr.s6_addr16[5], | ^ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:445:10: error: 'struct in6_addr' has no member named 's6_addr16' 445 | in6Addr.s6_addr16[6], in6Addr.s6_addr16[7]); | ^ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ ANALIZE.c:445:32: error: 'struct in6_addr' has no member named 's6_addr16' 445 | in6Addr.s6_addr16[6], in6Addr.s6_addr16[7]); | ^ /home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include/debug/sahtrace.h:283:173: note: in definition of macro 'SAH_TRACEZ_INFO' 283 | define SAH_TRACEZ_INFO(zone, format, ...) sahTraceZ(TRACE_LEVEL_INFO, zone, "%s%-7.7s%s - %s[%s]%s%s" format "%s - %s(%s@%s:%d)%s", SAHTRACE_ZONE(zone), SAHTRACE_INFO, ## __VA_ARGS__, SAHTRACE_SOURCE) | ^~~~~~~~~~~ cc1: all warnings being treated as errors 添加后编译通过
最新发布
11-12
<think>我们正在处理一个C语言编译警告:implicitdeclarationoffunction'inet_addr'根据引用[1]和引用[2]的信息,这个警告是因为编译器在编译时没有找到inet_addr函数的声明,于是隐式地假设该函数返回int类型,并且参数类型也是未知的(实际上会按照调用时传入的参数类型来推断,但容易出错)。引用[1]中提到了在C99标准中,隐式声明函数是无效的,所以会报出警告。引用[2]详细解释了这个问题:如果没有包含正确的头文件,编译器在编译阶段会假设函数返回int,并且不检查参数类型,这可能导致运行时错误。解决方案:包含声明该函数的头文件。根据引用[1]和引用[3],我们知道inet_addr函数用于将点分十进制的IP地址字符串转换为网络字节序的32位整数(in_addr_t)。它通常定义在<arpa/inet.h>(Linux/Unix)或<winsock2.h>和<ws2tcpip.h>(Windows)中。但是,我们注意到引用[3]是在Windows环境下使用MinGW的解决方案,其中提到了需要包含winsock2.h和ws2tcpip.h,并且可能需要定义_WIN32_WINNT宏。因此,我们需要根据操作系统来包含不同的头文件:对于Linux/Unix系统:#include<arpa/inet.h>对于Windows系统:#include<winsock2.h>#include<ws2tcpip.h>另外,在Windows中,可能还需要在包含头文件之前定义_WIN32_WINNT宏(如引用[3]所示),以确保使用较新版本的API。通常,定义0x0600表示支持Vista及更高版本的特性(包括inet_pton等,但inet_addr是一个较老的函数,可能不需要这个宏,但为了安全可以定义)。此外,在Windows中,链接时需要链接ws2_32库,即在编译命令中加入-lws2_32(对于gcc)或链接ws2_32.lib(对于MSVC)。因此,我们可以这样写:在代码中:#ifdef_WIN32#define_WIN32_WINNT0x0600//根据需要设置,0x0600对应Vista,inet_addr在更早的版本就有,但定义它通常无害#include<winsock2.h>#include<ws2tcpip.h>#else#include<arpa/inet.h>#endif然后,在Windows环境下编译链接时,需要链接ws2_32库。例如,使用gcc编译:gccyourfile.c-ooutput-lws2_32#Windowsgccyourfile.c-ooutput#Linux不需要额外的库如果已经包含了正确的头文件,那么警告应该消失。但是,请注意:inet_addr函数已经被认为是不安全的(因为它不支持IPv6),推荐使用inet_pton函数。如果可能,考虑使用inet_pton代替。总结步骤:1.在代码中包含正确的头文件(根据平台)。2.在Windows中,可能需要定义_WIN32_WINNT宏(如果使用新特性,但inet_addr不需要,不过定义也无妨)。3.在Windows中链接ws2_32库。如果问题仍然存在,请检查头文件是否包含正确,以及编译链接选项是否正确。根据上述分析,我们可以编写解决方案。</think>### 解决 `implicit declaration of function 'inet_addr'` 编译警告 此警告表示编译器在调用 `inet_addr()` 函数前未找到其声明,会隐式假设函数返回 `int` 类型且参数类型未知,可能导致运行时错误。以下是解决方案: #### 1. **包含正确的头文件** - **Windows 系统**: 需包含 `<winsock2.h>` 和 `<ws2tcpip.h>`,并定义 Windows 版本宏(推荐): ```c #define _WIN32_WINNT 0x0600 // 定义 Windows 版本(Vista+) #include <winsock2.h> #include <ws2tcpip.h> ``` **编译时需链接 `ws2_32` 库**: ```bash gcc your_file.c -o output -lws2_32 ``` - **Linux/Unix 系统**: 包含 `<arpa/inet.h>`: ```c #include <arpa/inet.h> ``` #### 2. **检查函数签名正确性** - 确保调用方式符合声明: ```c // 正确用法(字符串转网络字节序的32位IP) struct sockaddr_in addr; addr.sin_addr.s_addr = inet_addr("192.168.1.1"); ``` #### 3. **替代方案:使用 `inet_pton()`(推荐)** - **更安全的函数**(支持 IPv6 和错误检查): ```c #include <arpa/inet.h> // Linux #include <ws2tcpip.h> // Windows struct sockaddr_in addr; inet_pton(AF_INET, "192.168.1.1", &addr.sin_addr); ``` - Windows 需确保 `_WIN32_WINNT >= 0x0600`。 #### 4. **验证编译环境** - **检查标准兼容性**:确保代码符合 C99 或更高标准(禁用隐式声明)。 - **头文件顺序**:在 Windows 中,`<winsock2.h>` 必须在 `<windows.h>` 前包含。 ### 问题原因分析 - **隐式声明风险**:编译器未找到函数声明时,会假设函数返回 `int` 且参数任意,可能导致参数传递错误或崩溃[^2]。 - **头文件缺失**:`inet_addr()` 的声明位于系统网络头文件中,未包含则触发警告[^1]。 - **平台差异**:Windows 需额外链接 `ws2_32` 库并定义版本宏[^3]。 ### 总结步骤 1. **包含平台适配的头文件**(Windows: `<winsock2.h>` + `<ws2tcpip.h>`;Linux: `<arpa/inet.h>`)。 2. **Windows 需**: - 定义 `_WIN32_WINNT 0x0600` - 链接 `-lws2_32`。 3. **优先使用 `inet_pton()`** 以增强安全性和兼容性。 > **关键点**:始终显式声明函数,遵循标准(如 C99),避免隐式声明导致的未定义行为[^2]。
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值