gcc 编译c代码出现:
warning: no newline at end of file
警告
解决:源文件最后一行没有回车符造成的,在最后一行敲一个回车,然后保存重新编译。
原因:
"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)."