[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] "New line at end of file when saving" as project preference
|
>> BTW, My vote is to not make this the default. I hate editors mucking
>> with my files. Some compilers deal with no new line at the end just fine
>> (gcc just raises a warning).
> I agree with you that it probably shouldn't be the default. That's why I
> figured a project specific preference would be the best way to go.
>
> Raised it as a enhancement request against CDT-UI:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=226285
In my opinion it should be the default, according to the ansi standard
a non-empty file shall end in a new-line character, so by not
generating it you actually end up with an invalid file. On source
files you will indeed generally only get a warning, but include files not
having a newline at the end may cause more obscure preprocessing issues.
Another major argument is that vi also automatically generates a
newline at the end-of-file...
Regards,
Wieant