[Bug other/80062] New: gcc/c-family/c-cppbuiltin.c: PVS-Studio: V581
khandeliants at viva64 dot com
gcc-bugzilla@gcc.gnu.org
Thu Mar 16 06:48:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80062
Bug ID: 80062
Summary: gcc/c-family/c-cppbuiltin.c: PVS-Studio: V581
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: khandeliants at viva64 dot com
Target Milestone: ---
We have found a bug using PVS-Studio tool. PVS-Studio is a static code analyzer
for C, C++ and C#: https://www.viva64.com/en/pvs-studio/
Analyzer warning: V581 The conditional expressions of the 'if' operators
situated alongside each other are identical. Check lines: 920, 922.
c-cppbuiltin.c 922
void c_cpp_builtins (cpp_reader *pfile)
{
....
if (cxx_dialect >= cxx11)
{
if (cxx_dialect == cxx11)
cpp_define (pfile, "__cpp_constexpr=200704");
if (cxx_dialect <= cxx14) // <=
cpp_define (pfile, "__cpp_range_based_for=200907");
if (cxx_dialect <= cxx14) // <=
cpp_define (pfile, "__cpp_static_assert=200410");
....
}
....
}
More information about the Gcc-bugs
mailing list