This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Compilation warning in simple-object-xcoff.c
- From: DJ Delorie <dj at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org
- Date: Tue, 16 Jan 2018 13:00:48 -0500
- Subject: Re: Compilation warning in simple-object-xcoff.c
- Authentication-results: sourceware.org; auth=none
I think that warning is valid - the host has a 32-bit limit to file
sizes (off_t) but it's trying to read a 64-bit offset (in that clause).
It's warning you that you won't be able to handle files as large as the
field implies.
Can we hide the warning? Probably. Should we? Debatable, as long as
we want 64-bit xcoff support in 32-bit filesystems.
Otherwise, we'd need to detect off_t overflow somehow, down the slippery
slope of reporting the error to the caller...