This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals
- From: Dodji Seketeli <dodji at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Bernd Edlinger <bernd dot edlinger at hotmail dot de>, "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Oct 2013 16:00:01 +0100
- Subject: Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals
- Authentication-results: sourceware.org; auth=none
- References: <DUB122-W32B887B9B78C252A2B9146E40B0 at phx dot gbl> <20131031144309 dot GR27813 at tucnak dot zalov dot cz>
Jakub Jelinek <email@example.com> writes:
> On Thu, Oct 31, 2013 at 03:36:07PM +0100, Bernd Edlinger wrote:
>> if you want to read zero-chars, why don't you simply use fgetc,
>> optionally replacing '\0' with ' ' in read_line?
> Because it is too slow?
> getline(3) would be much better for this purpose, though of course
> it is a GNU extension in glibc and so we'd need some fallback, which
> very well could be the fgetc or something similar.
So would getline (+ the current patch as a fallback) be acceptable?