This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: compilation for files > 2Gb
On Thu, Jan 25, 2001 at 12:30:21PM -0800, Zack Weinberg wrote:
> 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.)
Actually, unless gcc is compiled with -D_FILE_OFFSET_BITS=64, the error
would happen much earlier, particularly in open_file, open() would return
-EFBIG first.
/* Don't issue an error message if the file doesn't exist. */
if (errno != ENOENT && errno != ENOTDIR)
cpp_error_from_errno (pfile, filename);
Jakub