【发布时间】:2015-07-09 14:35:19
【问题描述】:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(void)
{
int fd;
fd = open("abc.txt", O_RDONLY);
if (fd < 0)
{
exit(EXIT_FAILURE);
}
printf("fd %d\n", fd);
close(fd);
exit(EXIT_SUCCESS);
}
现在我构建它:
$ cc -errwarn=%all -o ~/tmp/aa ~/tmp/a.c
warning: bad message tag: /export/home/rmashak/tmp/a.call
$ cc -V
cc: Sun C 5.12 SunOS_i386 2011/11/16
它确实执行得很好,但是警告是什么?
【问题讨论】:
-
你用的是什么编译器?
-
我用编译器信息更新了我的问题。
-
来自文档 (docs.oracle.com/cd/E24457_01/html/E21990/bjapr.html#bjaqj) 我敢说这是一个编译器错误。你能更新编译器吗?
标签: file-io solaris opensolaris