Cygwin warning command


Cygwin warning command



I am using Cygwin to compile c++ programs, but I need to know what command do I use to show warnings when there is no endline or new line in the program. I tried using commands like -Wall, -Pedantic, etc but nothing shows up.



Below is the current cygwin I am using.







You mean when the *.cpp file does not end with a newline? This used to be technically illegal, but few compilers cared, and it has been legal since C++11.
– aschepler
2 days ago





Yea, when the *.cpp file does not end with a new line. I am trying to see if it can give me a warning when I don't add a newline.
– ek9
2 days ago






You will have to write a shell script to detect if your files have new lines at the end of file.
– Ashish Shirodkar
2 days ago




1 Answer
1



This is an improvement made by GCC people for portability, gcc 4.3 onwards. There is no way to get this warning back.



See Here: gcc 4.3 no longer warns about missing newlines at end of files






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Opening a url is failing in Swift

Export result set on Dbeaver to CSV