This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: compilation for files > 2Gb
- To: Joe Buck <jbuck at racerx dot synopsys dot com>
- Subject: Re: compilation for files > 2Gb
- From: "Zack Weinberg" <zackw at Stanford dot EDU>
- Date: Thu, 25 Jan 2001 12:30:21 -0800
- Cc: egcs at thewrittenword dot com, Jakub Jelinek <jakub at redhat dot com>, BLATS at fr dot ibm dot com, gcc at gcc dot gnu dot org
- References: <20010125091935.A26636@wolery.stanford.edu> <200101251952.LAA10684@racerx.synopsys.com>
On Thu, Jan 25, 2001 at 11:51:43AM -0800, Joe Buck wrote:
> [ problems with gcc reading multi-gigabyte files because of mmap issues ]
>
> Zack writes:
> > Honestly, I cannot think of a legitimate reason why anyone would need
> > a C(++) source file that large. I could be persuaded otherwise with
> > an example, but until one arises, I don't see any need to support them
> > in GCC.
>
> I agree, there are certainly more pressing problems. However, if we
> aren't going to support it, ideally GCC should produce a message
> describing the problem ("File foobar.h is too large to be mapped into
> memory" or some such) rather than just fail mysteriously.
We do:
if (inc->st.st_size > INTTYPE_MAXIMUM (ssize_t))
{
cpp_error (pfile, "%s is too large", inc->name);
goto fail;
}
size = inc->st.st_size;
Perhaps the message could be made clearer. At the time I didn't feel
there was any need to explain the reason it isn't supported to the
user. (There's a long comment in the source, though.)
zw