linux 로 gcc 환경에서 컴파일 해보면 가끔 no newline at end of file 이라는 warning을 발견 할 수 있다네요... 
(저도 발견했다가 찾아서 해결하는 방법도 찾은.. ) 

gcc.gnu.org 에 따르면, 
include를 하거나 함수 리턴에 의하여 뒤에 실행되어야 할 내용이 있음에도 불구하고
그것을 종료시켰을때. 일어나는 워닝 이라고 하는데... 
(맞게 해석한거 맞어..? ;; ) 

괜히 (잘못된? ) 불필요한 return 등을 달았을때 발생 하는거 같네요. 
(저는 받은 코드에서 return을 제거하니 되더라는. ) 

아래는 위 사이트에서 한 설명입니다. 


> What is the rationale for this warning ? What can break or is it a
> standards thing ?

Imagine foo.h:

blah blah blah<no newline>

Now bar.c:

#include "foo.h"
#include "grill.h"

Now imagine a preprocessor that isn't smart enough to put
the newline in for you...

blah blah blah#include "grill.h"

It may not include grill.h.

'Study.. > Programming' 카테고리의 다른 글

linux 에서 실행시간 확인 하기..  (0) 2009.06.30
race condition ( thread, mutex, semaphore)  (0) 2009.05.29
Javascript 계산기  (0) 2008.10.28
printf 의 16진수 / 8진수 출력..  (0) 2008.09.18
Intelligent completion at Vim 7.0  (0) 2008.06.03
Posted by Yoons...
,