#10335 - Snoobab - Tue Sep 02, 2003 7:34 pm
Hi guys,
I keep on getting this warning in VC++ 6.
'C:/GBA_DEV/SpriteCtrl/Source/gba_dma.h:60:6: warning: no newline at end of file'
Everytime I add a header file to my project another identical warning appears. I know the warning should be self explainitory but this one has kinda stumped me. I'm using DevKitAdv r4 (GCC 3.0.2).
Hope u can help.
#10336 - tepples - Tue Sep 02, 2003 7:51 pm
Try adding a blank line at the end of each affected header file. Some older C compilers and C++ compilers can't handle header files that don't have a newline at the end, and GCC gives warnings for violations of practices listed in ANSI C++ as "recommended".
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#10348 - Geno - Wed Sep 03, 2003 12:39 am
That's like... one of the most OBVIOUS warnings... 0_o
But it's one of those which you can ignore.
_________________
Out of Order.
#10350 - zazery - Wed Sep 03, 2003 1:19 am
I found it to be annoying so I just put the extra line in so it wouldn't say that and I can really concentrait on my real problems. Just a personal preference thats all.
#10352 - Geno - Wed Sep 03, 2003 5:19 am
OCD eh?
_________________
Out of Order.
#10360 - Paul Shirley - Wed Sep 03, 2003 12:42 pm
removed
Last edited by Paul Shirley on Sun Mar 28, 2004 10:09 pm; edited 1 time in total
#10370 - marcmccann - Wed Sep 03, 2003 2:34 pm
If ur using DevKitAdv as the compiler from within visual studio, thats ur problem. Theres a stupid bug in DevKitAdv that makes it want a new line at the end of every file. Its harmless but annoying
_________________
The GBA is one Lean and Mean machine!
#10376 - tepples - Wed Sep 03, 2003 5:05 pm
marcmccann wrote: |
Theres a stupid bug in DevKitAdv that makes it want a new line at the end of every file. |
That's not a bug. It's part of the ANSI C standard, which recommends that all source code files end with a newline character. GCC treats violations of the standard's requirements as errors, and it issues warnings for violations of the standard's recommendations.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#10383 - Snoobab - Wed Sep 03, 2003 7:23 pm
Thanks for the feedback guys. I'll give your suggestions a try.
#10409 - marcmccann - Thu Sep 04, 2003 9:45 am
Seriously tepples? well, you learn something new every day...
_________________
The GBA is one Lean and Mean machine!