annoying warning message from g++ compiler
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 ?
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 :)
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
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement