[all-commits] [llvm/llvm-project] e9355b: [libc] Use __SIZEOF_LONG__ to define LONG_WIDTH in...

lntue via All-commits all-commits at lists.llvm.org
Wed Jan 24 17:02:16 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9355b1b3e36616bb86575270ff3a4664d2cf4f7
      https://github.com/llvm/llvm-project/commit/e9355b1b3e36616bb86575270ff3a4664d2cf4f7
  Author: lntue <35648136+lntue at users.noreply.github.com>
  Date:   2024-01-24 (Wed, 24 Jan 2024)

  Changed paths:
    M libc/include/llvm-libc-macros/limits-macros.h

  Log Message:
  -----------
  [libc] Use __SIZEOF_LONG__ to define LONG_WIDTH instead of sizeof(long). (#79391)

The standard requires `limits.h` constants to be used in preprocessors.
So we use `__SIZEOF_LONG__` instead of `sizeof(long)` to define
`LONG_WIDTH`. The macro `__SIZEOF_LONG__` seems to be available on both
clang and gcc since at least version 9.




More information about the All-commits mailing list