From: Manuel Nickschas Date: Tue, 27 Feb 2018 10:33:03 +0000 (+0100) Subject: qa: Replace [[fallthrough]] by [[clang::fallthrough]] X-Git-Tag: 0.12.5~13 X-Git-Url: https://git.quassel-irc.org/?a=commitdiff_plain;ds=inline;h=fefbb186cc197295ce493322832cadf22ee1cefe;hp=fefbb186cc197295ce493322832cadf22ee1cefe;p=quassel.git qa: Replace [[fallthrough]] by [[clang::fallthrough]] The [[fallthrough]] attribute is a C++17 extension. It happens to work in GCC 7, but causes warnings or even failures in other compilers. In my quest to find a syntax that makes all compilers happy without having to disable the (useful) warning, I think I have finally found a way. Using the clang:: namespace seems to solve several issues: * It is marked as a compiler extension, so compilers not supporting it should simply ignore the attribute * It (obviously) works in Clang, which is nice when using a Clang-based IDE like Qt Creator * For some reason, it also seems to silence warnings in GCC; I guess one of GCC's fancy regexes somehow matches (cherry picked from commit 9ba2ca5186c8598e33910a7df95bbdbf812a1a3d) ---