<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - -Wno-argument-outside-range flag doesn't seem to work in clang-1200.0.32.28"
href="https://bugs.llvm.org/show_bug.cgi?id=48680">48680</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-Wno-argument-outside-range flag doesn't seem to work in clang-1200.0.32.28
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rojailal@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>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?
<a href="https://clang.llvm.org/docs/DiagnosticsReference.html#wargument-outside-range">https://clang.llvm.org/docs/DiagnosticsReference.html#wargument-outside-range</a>
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/<a href="mailto:openssl@1.1">openssl@1.1</a>/include -I/opt/homebrew/opt/sqlite/include
-I/Users/ronj/Documents/tfmac/include
-I/opt/homebrew/Cellar/<a href="mailto:python@3.8">python@3.8</a>/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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>