util: add a FALLTROUGH macro
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 24 Nov 2020 17:02:49 +0000 (18:02 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 1 Dec 2020 09:04:40 +0000 (10:04 +0100)
commit5e7c00aacb98cfd45082489bee05a456637c5349
treecc1b5075e5b3d64154936bb1bb31ffb15b5f1990
parenta5b899c7da4dc628debf11ff10e27000f62aed34
util: add a FALLTROUGH macro

Not all compilers support __atttribute__((fallthrough)) so use a macro.

v2: use C++17 / C18 standard attribute (Tony Wasserka)

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
src/util/compiler.h