473,387 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

An warring generated by the GCC

Anyone can told me about the warrning which GCC generated as following:
"No newline at end of file"?
Jun 27 '08 #1
4 1019
On May 7, 7:47*pm, friendfish <friendf...@gmail.comwrote:
Anyone can told me about the warrning which GCC generated as following:
"No newline at end of file"?
By convention, in a Unix "text" file, all lines are terminated by the
newline character.
Most Unix text editors respect this convention.
gcc is warning you that the file is not conforming to the convention,
which means the last line might have been truncated and therefore you
should look into that as it is a potential problem.
Jun 27 '08 #2
fnegroni wrote:
On May 7, 7:47�pm, friendfish <friendf...@gmail.comwrote:
Anyone can told me about the warrning which GCC generated as
following: "No newline at end of file"?

By convention, in a Unix "text" file, all lines are terminated by the
newline character.
Most Unix text editors respect this convention.
gcc is warning you that the file is not conforming to the convention,
which means the last line might have been truncated and therefore
you should look into that as it is a potential problem.
<http://groups.google.com/group/comp.lang.c/search?
group=comp.lang.c&q=No+newline+at+end+of+file>

--
Peter
Jun 27 '08 #3
On Thu, 08 May 2008 10:47:57 +0800, friendfish <fr********@gmail.com>
wrote in comp.lang.c:
Anyone can told me about the warrning which GCC generated as following:
"No newline at end of file"?
The C standard states that "a source file that is non-empty shall end
in a new-line character" and your source file doesn't. So add one.

Open the source file in a text editor. Move the cursor to the end of
the last line, after the last character. Press the "Enter" key on
your keyboard. Save the file.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
Jun 27 '08 #4
friendfish wrote:
>
Anyone can told me about the warrning which GCC generated as following:
"No newline at end of file"?
It means that there is "No newline at end of file". What's the
problem? Is it so hard to add it?

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Irmen de Jong | last post by:
Hello, I don't understand why the following doesn't work. What I want to do is dynamically import some generated Python code and I'm doing this using compile and exec'ing it in the dict of a new...
3
by: Headless | last post by:
Should linking generated content work? Example: span:before{content:"foobar"} <a href="foobar.htm"><span></span></a> I stumbled across this bit in the CSS2 spec: >Generated content does...
6
by: Dave | last post by:
Hello all, Consider this function template definition: template<typename T> void foo(T) {} If foo is never called, this template will never be instantiated. Now consider this explicit...
1
by: Robert Stearns | last post by:
I have two related questions. Why did I have to: SET INTEGRITY FOR is3.animals OFF; before doing: alter table is3.animals add column pseudo_id generated always as (coalesce(regnum,...
2
by: msnews.microsoft.com | last post by:
AOA I am using httpwebrequst and httwebresponse classes in order to execute an html page. The html generaed is then emailed. My problem is that I am calling the GenerateHtmlText() method which is...
1
by: Peter McEvoy | last post by:
Hi all, another question related to Schema and WSDL... I'd like to have a bit more control over the WSDL that is generated for my ..asmx. In particular, I'd like to override the generated WSDL...
17
by: Darek | last post by:
Hi, I have a table, something similar to: create table my_table ( id char(32) not null primary key, num integer not null, code varchar(2) not null, name varchar(60) not null,
4
by: Fabio | last post by:
An ASP.NET 2.0 web site contains a web form and a web service. The web form consumes the web service. There is a Book class in the App_Code folder. The web service exposes a method that returns a...
1
by: Frank Swarbrick | last post by:
We're trying to take advantage of the new ROW CHANGE TIMESTAMP option. Here is a simple table: CREATE TABLE "ACCTASGN"."NUMBER_STATUS" ( "STATUS_CODE" CHAR(1) NOT NULL , "STATUS_DESCRIPTION"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.