T O P I C R E V I E W |
mstormo |
Posted - May 31 2006 : 09:27:34 AM It would be nice if Visual Assist X would have an option to ensure that source files end with a newline. As the sourcecode I write is used cross-platform, I sometimes forget to add this newline at the end of a source file, the code on other platforms using gcc will complain with a compile warning: warning: no newline at end of file
When the "Add newline at end of file" is turned on, VAX could simply check when a file is saved, and add it if necessary.
-- .marius
|
3 L A T E S T R E P L I E S (Newest First) |
jpizzi |
Posted - Jun 02 2006 : 12:07:50 AM The reason for it is that the standard says that if a non-empty source file does not end in a new line character, the behavior is undefined.
Part of the reason for this is the multitude of problems that might occur if one file ends in the middle of some construct (although this is only partially mitigated by the end-of-line rule). |
efortier |
Posted - Jun 01 2006 : 8:58:50 PM I'm also using a compiler that complains about this. I don't understand the reason for the warning, but I got into the habit of always running a macro to add a newline whenever I open a new source file.
Thanks for adding a request for this. |
feline |
Posted - May 31 2006 : 3:21:36 PM i know exactly what you mean, quite a bit of my code has to compile under UNIX. for me adding the blank like has become something of a habit
i was sure we already had an outstanding request for this but i cannot find it, so i have put in a new one.
case=1225 |