error: "no newline at end of file"
Florian Weimer
fw@deneb.enyo.de
Tue Mar 27 16:52:00 GMT 2007
* Ian Lance Taylor:
> I don't think we necessarily have to change anything.
Yes, I think that the standard does not require a particular approach
to this problem.
> But I think that Florian's point is that we don't have to confuse the
> concrete implementation with the abstract source representation. We
> could define gcc such that when it sees a concrete file which does not
> end in ASCII 0x0a, it automatically appends ASCII 0x0a in the abstract
> representation.
Exactly. During the first translation phase, end-of-line indicators
are converted to new-line characters. If the majority of compilers
treats end-of-file as an end-of-line indicator (which wouldn't
surprise me), GCC can and should follow the crowd.
More information about the Gcc
mailing list