This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libcpp] [PATCH] Handle DOS EOF character for DJGPP


On Wednesday 20 April 2005 08:35, Zack Weinberg wrote:
> DJ Delorie <dj@redhat.com> writes:
> > I think we can safely rule this out.  All the MS-based gcc platforms
> > do not (or at least should not) add ^Z to text files, so no generator
> > should produce such files.
>
> Good to know.
>
> >> files originally created on MS-DOS and bearing a
> >> correctly-positioned ^Z,
> >
> > Just FYI, "correctly-positioned" is an invalid assumption.  There is
> > *no* rule that the ^Z can only appear at EOF; in fact in the original
> > CP/M it almost always showed up elsewhere, as file sizes were always
> > rounded up to sector sizes, and the ^Z was usually in the middle of
> > the sector.
>
> I understand this; I just don't think we can cater to that in GCC.
>

As far as I remember I had  bootstrap error due to ^Z in some file 
(generated while bootstrapping GCC) earlier. I failed to reproduce it however 
with recent 4.1 CVS version: at least bootstrap stage 1 and stage 2 built Ok 
(c, c++, f95, objc) without this patch.

I think we should however handle the situation when ^Z is the last
byte of the file (as read from file, not after some transformation). I'll 
provide patch sometimes later.

Andris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]