https://bugs.llvm.org/show_bug.cgi?id=44524
Bug ID: 44524
Summary: Pruning of dead -Wshift-count-overflow suppressed in
dead branches of _Generic
Product: clang
Version: 9.0
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
A simple example in which I'm getting undesirable -Wshift-count-overflow
warnings
is
(void)_Generic(0, int: 0, char: /*untaken*/ 0 ? 1 << 200 : 0);
//-Wshift-count-overflow warning
The warning does not come up in a simple
(void)_Generic(0, char: 0, int: /*taken*/ 0 ? 1 << 200 : 0); //no
warning as expected
or in a flat
(void)( 0 ? 1 << 200 : 0 ); //no warning as expected
Examples on Compiler Explorer: https://gcc.godbolt.org/z/dW8h2K
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs