[llvm-bugs] [Bug 48680] New: -Wno-argument-outside-range flag doesn't seem to work in clang-1200.0.32.28
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jan 6 20:52:32 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48680
Bug ID: 48680
Summary: -Wno-argument-outside-range flag doesn't seem to work
in clang-1200.0.32.28
Product: clang
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: rojailal at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
numpy/core/src/_simd/_simd.dispatch.c.src:306:1: error: argument value 0 is
outside the valid range [1, 64]
SIMD_IMPL_INTRIN_2IMM(shri_s64, vs64, vs64, 64)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
numpy/core/src/_simd/_simd_easyintrin.inc:93:11: note: expanded from macro
'SIMD_IMPL_INTRIN_2IMM'
) npyv_##NAME(arg1.data.IN0, 0); \
^ ~
<scratch space>:124:1: note: expanded from here
npyv_shri_s64
^
numpy/core/src/common/simd/neon/operators.h:42:49: note: expanded from macro
'npyv_shri_s64'
#define npyv_shri_s64(VEC, C) ((C) == 0 ? VEC : vshrq_n_s64(VEC, C))
^ ~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/arm_neon.h:24059:23:
note: expanded from macro 'vshrq_n_s64'
__ret = (int64x2_t) __builtin_neon_vshrq_n_v((int8x16_t)__s0, __p1, 35); \
^ ~~~~
I get the above error whether I use the flag "-Wno-argument-outside-range" or
not, or using other flags to try and suppress this error (ex
"-Wno-error=argument-outside-range" or "-w"). The header file (operators.h in
the above sample) has a check for a 0 bound, so this code should be able to
compile and run safely.
Is this a bug, or is there perhaps another way clang should be configured to
suppress errors of this type?
https://clang.llvm.org/docs/DiagnosticsReference.html#wargument-outside-range
full command:
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic
-Wno-argument-outside-range -I/opt/homebrew/include -isysroot
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers
-I/opt/homebrew/opt/llvm/include -Xpreprocessor -fopenmp -DNPY_INTERNAL_BUILD=1
-DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1
-D_LARGEFILE64_SOURCE=1 -Ibuild/src.macosx-11-arm64-3.8/numpy/core/src/_simd
-Inumpy/core/include -Ibuild/src.macosx-11-arm64-3.8/numpy/core/include/numpy
-Ibuild/src.macosx-11-arm64-3.8/numpy/distutils/include -Inumpy/core/src/common
-Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath
-Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort
-Inumpy/core/src/_simd -I/opt/homebrew/include
-I/opt/homebrew/opt/openssl at 1.1/include -I/opt/homebrew/opt/sqlite/include
-I/Users/ronj/Documents/tfmac/include
-I/opt/homebrew/Cellar/python at 3.8/3.8.7/Frameworks/Python.framework/Versions/3.8/include/python3.8
-Ibuild/src.macosx-11-arm64-3.8/numpy/core/src/common
-Ibuild/src.macosx-11-arm64-3.8/numpy/core/src/npymath -c
build/src.macosx-11-arm64-3.8/numpy/core/src/_simd/_simd.dispatch.c
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210107/f41f99e2/attachment.html>
More information about the llvm-bugs
mailing list