armv7 targeting (on aarch64, via poudriere-devel): system's clang 13 rejected building devel/lllvm13

Mark Millard via arm <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <15A74B79-47CF-4743-A831-D7C0E9B1DD0E__49755.8019984112$1637000209$gmane$org@yahoo.com>
There error was:

error: non-constant-expression cannot be narrowed from type 'long long' to 'std::size_t' (aka 'unsi
gned int') in initializer list [-Wc++11-narrowing]
  std::size_t resultBytes{size * elementBytes};
                          ^~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.0.src/flang/runtime/misc-intrinsic.cpp:50:27: note: insert an explicit cast to silence this issue
  std::size_t resultBytes{size * elementBytes};
                          ^~~~~~~~~~~~~~~~~~~
                          static_cast<size_t>( )

More context:

===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
/usr/bin/c++ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/wrkdirs/usr/ports/devel/llvm13/work/.build/tools/flang/runtime -I/wrkdi
rs/usr/ports/devel/llvm13/work/llvm-project-13.0.0.src/flang/runtime -I/wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.0.src/flang/include -I/wrkdirs/usr/ports/devel/llvm13/work/.build/tools/fl
ang/include -I/wrkdirs/usr/ports/devel/llvm13/work/.build/include -I/wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.0.src/llvm/include -isystem /wrkdirs/usr/ports/devel/llvm13/work/llvm-project
-13.0.0.src/llvm/../mlir/include -isystem /wrkdirs/usr/ports/devel/llvm13/work/.build/tools/mlir/include -isystem /wrkdirs/usr/ports/devel/llvm13/work/.build/tools/clang/include -isystem /wrkdirs/usr/
ports/devel/llvm13/work/llvm-project-13.0.0.src/llvm/../clang/include -O2 -pipe -mcpu=cortex-a7 -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -mcpu=cortex-a7  -DND
EBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-
initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstr
ing-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-unused-command-line-argument -Wstring-conversion       
    -Wcovered-switch-default -Wno-nested-anon-types -O2 -pipe -mcpu=cortex-a7 -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -mcpu=cortex-a7  -DNDEBUG -isystem /usr
/local/include -std=c++17  -fno-exceptions -MD -MT tools/flang/runtime/CMakeFiles/obj.FortranRuntime.dir/misc-intrinsic.cpp.o -MF tools/flang/runtime/CMakeFiles/obj.FortranRuntime.dir/misc-intrinsic.c
pp.o.d -o tools/flang/runtime/CMakeFiles/obj.FortranRuntime.dir/misc-intrinsic.cpp.o -c /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.0.src/flang/runtime/misc-intrinsic.cpp
/wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.0.src/flang/runtime/misc-intrinsic.cpp:50:27: error: non-constant-expression cannot be narrowed from type 'long long' to 'std::size_t' (aka 'unsi
gned int') in initializer list [-Wc++11-narrowing]
  std::size_t resultBytes{size * elementBytes};
                          ^~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.0.src/flang/runtime/misc-intrinsic.cpp:50:27: note: insert an explicit cast to silence this issue
  std::size_t resultBytes{size * elementBytes};
                          ^~~~~~~~~~~~~~~~~~~
                          static_cast<size_t>( )
1 error generated.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.