https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118010
Bug ID: 118010 Summary: -Wlto-type-mismatch warning/error during m2 bootstrap on arm (gm2-libs-boot/Glibc.h:206:16: warning: type of ‘libc_lseek’ does not match original declaration [-Wlto-type-mismatch]) Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: build Severity: normal Priority: P3 Component: modula2 Assignee: gaius at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Noticed this when bootstrapping on arm: ``` m2/gm2-libs-boot/Glibc.h:206:16: warning: type of ‘libc_lseek’ does not match original declaration [-Wlto-type-mismatch] 206 | EXTERN ssize_t libc_lseek (int fd, ssize_t offset, int whence); | ^ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/m2/mc-boot-ch/Glibc.c:356:1: note: return value type mismatch 356 | libc_lseek (int fd, off_t offset, int whence) | ^ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/m2/mc-boot-ch/Glibc.c:356:1: note: type ‘off_t’ should match type ‘ssize_t’ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/m2/mc-boot-ch/Glibc.c:356:1: note: ‘libc_lseek’ was previously declared here /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/m2/mc-boot-ch/Glibc.c:356:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used ``` Note that the size of off_t depends on whether Large File Support (LFS) is being used.