https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99565
--- Comment #2 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> --- ``` <source>: In member function 'int& A::x()': <source>:6:23: warning: this condition has identical branches [-Wduplicated-branches] 6 | int& x() { return 0 ? a : b; } | ~~^~~~~~~ ``` My actual use case looks more like this: https://godbolt.org/z/W5ajeM. ```C++ struct A { char x; long long y; }; struct B { double x; long long y; }; struct C { int i; union { A a; B b; }; long long& y() { return i ? a.y : b.y; } }; ``` ``` <source>: In member function 'long long int& C::y()': <source>:15:29: warning: this condition has identical branches [-Wduplicated-branches] 15 | long long& y() { return i ? a.y : b.y; } | ~~^~~~~~~~~~~ ```