annoying warning message from g++ compiler

Started by
2 comments, last by smart_idiot 18 years, 10 months ago
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 ?
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 :)
got it

thanks marzec :)
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.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.

This topic is closed to new replies.

Advertisement