[llvm-bugs] [Bug 35698] New: include/istream causes test failures on x86 due to -Werror, -Wtautological-constant-compare
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Dec 19 11:22:32 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35698
Bug ID: 35698
Summary: include/istream causes test failures on x86 due to
-Werror,-Wtautological-constant-compare
Product: libc++
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: mgorny at gentoo.org
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
A large number of libc++ and libc++abi tests have started failing on 32-bit x86
recently due to the following warning-errors:
FAIL: libc++abi :: cxa_bad_typeid.pass.cpp (44 of 57)
******************** TEST 'libc++abi :: cxa_bad_typeid.pass.cpp' FAILED
********************
Command: ['/usr/lib/llvm/6/bin/i686-pc-linux-gnu-clang', '-o',
'/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999-abi_x86_32.x86/test/Output/cxa_bad_typeid.pass.cpp.o',
'-x', 'c++',
'/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999/test/cxa_bad_typeid.pass.cpp',
'-c', '-v', '-D_LIBCPP_DISABLE_AVAILABILITY', '-ftemplate-depth=270',
'-Werror=thread-safety', '-DLIBCXXABI_NO_TIMER', '-funwind-tables',
'-std=c++2a', '-nostdinc++',
'-I/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxx/include',
'-I/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999/include',
'-I/usr/include', '-D__STDC_FORMAT_MACROS', '-D__STDC_LIMIT_MACROS',
'-D__STDC_CONSTANT_MACROS',
'-I/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxx/test/support',
'-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER', '-Wall', '-Wextra', '-Werror',
'-Wuser-defined-warnings', '-Wshadow', '-Wno-unused-command-line-argument',
'-Wno-attributes', '-Wno-pessimizing-move', '-Wno-c++11-extensions',
'-Wno-user-defined-literals', '-Wno-noexcept-type',
'-Wno-aligned-allocation-unavailable', '-Wsign-compare', '-Wunused-variable',
'-Wunused-parameter', '-Wunreachable-code', '-Wno-conversion',
'-Wno-unused-local-typedef', '-Wno-#warnings', '-c']
Exit Code: 1
Standard Error:
--
clang version 6.0.0
Target: i686-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/6/bin
Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: 32;@m32
"/usr/lib64/llvm/6/bin/clang-6.0" -cc1 -triple i686-pc-linux-gnu -emit-obj
-mrelax-all -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name cxa_bad_typeid.pass.cpp -mrelocation-model static
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu pentium4
-dwarf-column-info -debugger-tuning=gdb -v -coverage-notes-file
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999-abi_x86_32.x86/test/Output/cxa_bad_typeid.pass.cpp.gcno
-nostdinc++ -resource-dir /usr/lib64/llvm/6/bin/../../../../lib/clang/6.0.0 -D
_LIBCPP_DISABLE_AVAILABILITY -D LIBCXXABI_NO_TIMER -I
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxx/include -I
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999/include -I
/usr/include -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D
__STDC_CONSTANT_MACROS -I
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxx/test/support -D
_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -internal-isystem /usr/local/include
-internal-isystem /usr/lib64/llvm/6/bin/../../../../lib/clang/6.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-Werror=thread-safety -Wall -Wextra -Werror -Wuser-defined-warnings -Wshadow
-Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move
-Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type
-Wno-aligned-allocation-unavailable -Wsign-compare -Wunused-variable
-Wunused-parameter -Wunreachable-code -Wno-conversion -Wno-unused-local-typedef
-Wno-#warnings -std=c++2a -fdeprecated-macro -fdebug-compilation-dir
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999-abi_x86_32.x86/test
-ftemplate-depth 270 -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -o
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999-abi_x86_32.x86/test/Output/cxa_bad_typeid.pass.cpp.o
-x c++
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999/test/cxa_bad_typeid.pass.cpp
clang -cc1 version 6.0.0 based upon LLVM 6.0.0svn default target
x86_64-pc-linux-gnu
ignoring nonexistent directory
"/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxx/test/support"
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxx/include
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999/include
/usr/lib64/llvm/6/bin/../../../../lib/clang/6.0.0/include
/usr/include
End of search list.
In file included from
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxxabi-9999/test/cxa_bad_typeid.pass.cpp:18:
In file included from
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxx/include/iostream:40:
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxx/include/istream:714:24:
error: result of comparison 'long' < -2147483648 is always false
[-Werror,-Wtautological-constant-compare]
if (__temp < numeric_limits<int>::min())
~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-libs/libcxxabi-9999/work/libcxx/include/istream:719:29:
error: result of comparison 'long' > 2147483647 is always false
[-Werror,-Wtautological-constant-compare]
else if (__temp > numeric_limits<int>::max())
~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
--
Compilation failed unexpectedly!
********************
--
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/20171219/6b320a3b/attachment.html>
More information about the llvm-bugs
mailing list