Modernise __attributes__ and __builtin__expect with C++17/20 attributes

Issue #404 new