compilation for files > 2Gb
Zack Weinberg
zackw@Stanford.EDU
Thu Jan 25 12:30:00 GMT 2001
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
More information about the Gcc
mailing list