Jump to content
  • Advertisement
Sign in to follow this  
neverland

annoying warning message from g++ compiler

This topic is 4800 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all I've just upgraded my g++ compiler to 3.3.3 on Cygwin. But there is always a annoying warnig message "no new line at end of file" no matter what code you writes. How to get rid of that warnig message ?

Share this post


Link to post
Share on other sites
Advertisement
maybe just maybe, with a newline at the end of the file. that is a blank line. so in your last code line just press enter once, et voila the warning is gone. btw ever tried to compile with -Wall? have fun :)

Share this post


Link to post
Share on other sites
For the ultimate in useless warnings, compile with -Wall -W -Werror -pedantic-errors -Wfloat-equal -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wredundant-decls -Wunreachable-code -Winline -Wold-style-cast -Woverloaded-virtual -Wsign-promo -Weffc++ -O3

So anal, even

#include <iostream>

int main()
{
std::cout << "Hello World!" << std::endl;

return 0;
}


won't compile.

If you're actually seriously want lots of warnings, then remove -Weffc++ and -Wunreachable-code from above options so that the standard template library will continue to function as intended.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!