warning: no newline at end of file
来源:互联网 发布:未来网络总体发展趋势 编辑:程序博客网 时间:2024/04/30 22:39
GCC中如果文件最后不加上一行空行的话,就会吐个warning:no newline at end of file。
在《Rationale for the C99 standard》一文中,有C99的相关信息:
A backslash immediately before a newline has long been used to continue string literals, as well as preprocessing command lines. In the interest of easing machine generation of C, and of transporting code to machines with restrictive physical line lengths, the C89 Committee generalized this mechanism to permit any token to be continued by interposing a backslash/newline sequence.
为了一致性,代码的每一行后面都应该有一个“结束符”,也就是newline。避免当被include的文件展开后,前一个文件的最后一行与后一个文件的第一行直接被连接成一行从而造成错误。
不过像Visual Stdio之类的IDE没有报错,大概是它们自己主动插入了“结束符”吧。
- warning: no newline at end of file
- warning: no newline at end of file
- Warning: no newline at end of file
- warning: no newline at end of file
- warning: no newline at end of file
- warning: no newline at end of file?
- warning: no newline at end of file
- warning:no newline at end of file
- Linux: gcc warning warning: no newline at end of file
- gcc warning: no newline at end of file
- warning no newline at the end of file
- 如何解决warning: no newline at end of file?
- C-free提示warning: no newline at end of file
- warning: no newline at the end of file
- 解决warning: no newline at end of file
- 如何解决warning: no newline at end of file
- warning no newline at the end of file
- error:warning no newline at the end of file
- oracle设置客户端字符集并导出
- EXP-00091 正在导出有问题的统计信息
- 成长•盛大
- ajax修改实体对应数据库字段
- CORBA基本概念
- warning: no newline at end of file
- ESCAPE在SQL和PL/SQL中的使用
- C# Speech.Synthesis 语音朗读语调范例
- 条件 CHAIN 语句
- windows窗体高级控件
- 标题还没写完
- zigbee与其它近距离无线通信技术的比较
- 使用gethostname()得到主机名
- c#结构体