[all-commits] [llvm/llvm-project] ce1305: [libc] make off_t 32b for 32b arm (#77350)

Nick Desaulniers via All-commits all-commits at lists.llvm.org
Mon Jan 8 13:10:13 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ce1305a3cea42dad8dd6ee5606dd4259e8632953
      https://github.com/llvm/llvm-project/commit/ce1305a3cea42dad8dd6ee5606dd4259e8632953
  Author: Nick Desaulniers <nickdesaulniers at users.noreply.github.com>
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
    M libc/include/llvm-libc-types/off_t.h

  Log Message:
  -----------
  [libc] make off_t 32b for 32b arm (#77350)

Fixes the following diagnostic:

    llvm-project/libc/src/sys/mman/linux/mmap.cpp:44:59: error: implicit
conversion loses integer precision: 'off_t' (aka 'long long') to 'long'
    [-Werror,-Wshorten-64-to-32]
     size, prot, flags, fd, offset);
                            ^~~~~~

It looks like off_t is a curious types on different platforms. FWICT,
it's 32b
on arm (at least for arm-linux-gnueabi) but 64b elsewhere (including 32b
riscv32-linux-gnu).




More information about the All-commits mailing list