[Bug c++/118995] New: Missed optimization: [[assume]] works not as good as std::unreachable()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118995 Bug ID: 118995 Summary: Missed optimization: [[assume]] works not as good as std::unreachable() Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eugene.shalygin at gmail dot com Target Milestone: --- Using [[assume(exp)]]; results in worse optimization than when the same assumption is explained to the compiler via if (!expr) std::unreachable(). Don't know why implementations for these two differ, but there should be no difference with respect to how they drop code branches? Godbolt link with examples from #118933 and #109045: https://godbolt.org/z/KT5zjsKo9
[Bug c++/104734] -isystem hides -Woverloaded-virtual warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104734 Eugene Shalygin changed: What|Removed |Added CC||eugene.shalygin at gmail dot com --- Comment #6 from Eugene Shalygin --- Moreover, if the inherited class is not in the system header, to silence the warning one has to put the diagnostic ignoring pragma before the function in the base class, and not at the point when the mistake is made: https://godbolt.org/z/984qfzzcf