Skip to content

[Bug]: Clang warning when compiling a Chapel program: '__INT64_C' macro redefined #28249

@twesterhout

Description

@twesterhout

Summary of Problem

Description:

I'm getting these warnings when compiling Chapel programs. My first thought was that I'm using -I somewhere where I should be using -isystem, but -isystem doesn't seem to be a valid option for chpl. So throwing it here in case anyone has ideas what might be going on.

$ chpl src/hello6-taskpar-dist.chpl
In file included from <built-in>:1:
In file included from /nix/store/90hcszd7arp1nsfpvdsiqvbp82afbjzd-chapel-2.7/runtime/include/sys_basic.h:110:
In file included from /nix/store/n419mv5npkwqxcjihqz66na3jzg3hxdz-clang-wrapper-20.1.8/resource-root/include/stdint.h:56:
/nix/store/dqgfdpr53ldqmdfmginb1z6kzslkzsdl-glibc-2.40-66-dev/include/stdint.h:95:11: warning: '__INT64_C' macro redefined [-Wmacro-redefined]
   95 | #  define __INT64_C(c)  c ## L
      |           ^
<built-in>:207:9: note: previous definition is here
  207 | #define __INT64_C(c) c##L
      |         ^
In file included from <built-in>:1:
In file included from /nix/store/90hcszd7arp1nsfpvdsiqvbp82afbjzd-chapel-2.7/runtime/include/sys_basic.h:110:
In file included from /nix/store/n419mv5npkwqxcjihqz66na3jzg3hxdz-clang-wrapper-20.1.8/resource-root/include/stdint.h:56:
/nix/store/dqgfdpr53ldqmdfmginb1z6kzslkzsdl-glibc-2.40-66-dev/include/stdint.h:96:11: warning: '__UINT64_C' macro redefined [-Wmacro-redefined]
   96 | #  define __UINT64_C(c) c ## UL
      |           ^
<built-in>:241:9: note: previous definition is here
  241 | #define __UINT64_C(c) c##UL
      |         ^
2 warnings generated.

Is this issue currently blocking your progress?

no

Steps to Reproduce

Source Code:

hello6-taskpar-dist.chpl example from the documentation.

Compile command:

chpl src/hello6-taskpar-dist.chpl

Configuration Information

  • Output of chpl --version:
chpl version 2.7.0
  built with LLVM version 20.1.8
  available LLVM targets: xcore, x86-64, x86, wasm64, wasm32, ve, systemz, spirv, spirv64, spirv32, sparcel, sparcv9, sparc, riscv64, riscv32, ppc64le, ppc64, ppc32le, ppc32, nvptx64, nvptx, msp430, mips64el, mips64, mipsel, mips, loongarch64, loongarch32, lanai, hexagon, bpfeb, bpfel, bpf, avr, thumbeb, thumb, armeb, arm, amdgcn, r600, aarch64_32, aarch64_be, aarch64, arm64_32, arm64
  • Output of $CHPL_HOME/util/printchplenv --anonymize:
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: llvm
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: none *
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none *
CHPL_TIMERS: generic
CHPL_UNWIND: none *
CHPL_TARGET_MEM: jemalloc *
CHPL_ATOMICS: cstdlib
CHPL_GMP: none *
CHPL_HWLOC: bundled
CHPL_RE2: bundled *
CHPL_LLVM: system *
CHPL_AUX_FILESYS: none
  • Back-end compiler and version, e.g. gcc --version or clang --version:
clang version 20.1.8
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/5pfqy4mi1dkrwz5x571fkpnw4sxyjhp5-clang-20.1.8/bin
  • (For Cray systems only) Output of module list:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions