Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional. Can be replaced by `[[fallthrough]]` if/when we switch to C++17. The warning is now enabled by default for GCC on `extra` warnings level (part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet, but we could enable it manually once we switch to C++11. There's no equivalent feature in MSVC for now. Fixes #26135.
This commit is contained in:
@@ -127,6 +127,7 @@ static String _parser_expr(const GDScriptParser::Node *p_expr) {
|
||||
|
||||
case GDScriptParser::OperatorNode::OP_PARENT_CALL:
|
||||
txt += ".";
|
||||
FALLTHROUGH;
|
||||
case GDScriptParser::OperatorNode::OP_CALL: {
|
||||
|
||||
ERR_FAIL_COND_V(c_node->arguments.size() < 1, "");
|
||||
|
||||
Reference in New Issue
Block a user