https://bugs.llvm.org/show_bug.cgi?id=46438
Bug ID: 46438
Summary: Duplicated warning message in -Wcomma
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: haoxi...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
This code, bug.cc, clang-9 to clang-trunk emit two duplicated warning message
"warning: possible misuse of comma operator here [-Wcomma]", while clang-6 to
clang-8 just give one warning message about this.
$cat bug.cc
const long var = 10;
static_assert (1 ? ( 0 , var ) : 0 , "" );
$clang++-trunk -Wcomma -c bug.cc
bug.cc:2:24: warning: possible misuse of comma operator here [-Wcomma]
static_assert (1 ? ( 0 , var ) : 0 , "" );
^
bug.cc:2:22: note: cast expression to void to silence warning
static_assert (1 ? ( 0 , var ) : 0 , "" );
^
static_cast<void>( )
bug.cc:2:24: warning: possible misuse of comma operator here [-Wcomma]
static_assert (1 ? ( 0 , var ) : 0 , "" );
^
bug.cc:2:22: note: cast expression to void to silence warning
static_assert (1 ? ( 0 , var ) : 0 , "" );
^
static_cast<void>( )
2 warnings generated.
$clang++-8 -Wcomma -c bug.cc
bug.cc:2:24: warning: possible misuse of comma operator here [-Wcomma]
static_assert (1 ? ( 0 , var ) : 0 , "" );
^
bug.cc:2:22: note: cast expression to void to silence warning
static_assert (1 ? ( 0 , var ) : 0 , "" );
^
static_cast<void>( )
1 warning generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs