C规范里的趣闻Warning: no newline at end of file
来源:互联网 发布:python培训要多少钱 编辑:程序博客网 时间:2024/05/17 00:50
写过软件的人,编译软件的时候,大都遇到过这个提示,Warning: no newline at end of file 。这个warning不会引起bin文件任何异常。既然这样,引入这个warning报警,有什么意义呢。网上有不少细心人士探讨过,试图找到根源,以此总结经验,提高编程水平。但追踪的结果,却发现了一个有趣的现象。居然是C规范里的要求。
"The C language standard says
A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character.
Since this is a "shall" clause, we must emit a diagnostic message for a violation of this rule.
This is in section 2.1.1.2 of the ANSI C 1989 standard. Section 5.1.1.2 of the ISO C 1999 standard (and probably also the ISO C 1990 standard)."
参考:
http://blog.csdn.net/feiyuan1/article/details/6007495
0 0
- C规范里的趣闻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
- warning:no newline at end of file
- C-free提示warning: no newline at end of file
- warning: no newline at end of file的原因
- gcc 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?
- warning: no newline at the end of file
- 解决warning: no newline at end of file
- C++笔记:select多路复用机制
- 数组分割
- Android SDK更新失败及的解决方法
- TCP连接状态
- 硬盘无法识别怎么办?
- C规范里的趣闻Warning: no newline at end of file
- 浅学-MVC
- windows 声音编程之waveout
- java的接口
- input 子系统架构总结
- tcp/ip下,拥塞控制算法
- Java的运行原理
- 统计素数并求和
- 关于self.view以及applicationFrame之类屏幕高度的一点总结