https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95872
Bug ID: 95872 Summary: Duplicated warning message in "-Wlogical-op" Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com CC: mpolacek at gcc dot gnu.org Target Milestone: --- This code, bug.cc, GCC emits two duplicated warning messages about it. $cat bug.cc int a = 10; decltype(( a or a ) ? 1:0) var = 0; $g++ -c -Wlogical-op bug.cc bug.cc:2:14: warning: logical 'or' of equal expressions [-Wlogical-op] 2 | decltype(( a or a ) ? 1:0) var = 0; | ~~^~~~ bug.cc:2:14: warning: logical 'or' of equal expressions [-Wlogical-op] All GCC-6 to GCC-trunk versions have this issue.