@@ -1311,6 +1311,7 @@ _cpp_parse_expr (cpp_reader *pfile, bool is_if)
pfile->state.skip_eval++;
else
pfile->state.skip_eval--;
+ CPP_FALLTHRU ();
default:
break;
}
@@ -78,6 +78,12 @@ struct cset_converter
efficiency, and partly to limit runaway recursion. */
#define CPP_STACK_MAX 200
+#if __GNUC__ >= 7
+# define CPP_FALLTHRU() __builtin_fallthrough ()
+#else
+# define CPP_FALLTHRU()
+#endif
+
/* Host alignment handling. */
struct dummy
{
@@ -610,6 +610,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
if (l != 0)
break;
s += sizeof(unsigned long);
+ CPP_FALLTHRU ();
case 2:
l = u.l[i++];
if (l != 0)
@@ -1574,6 +1575,7 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
BUF_APPEND (base, cur - base);
base = cur;
BUF_APPEND ("\\", 1);
+ CPP_FALLTHRU ();
after_backslash:
if (note->type == ' ')
{
@@ -2415,6 +2417,7 @@ _cpp_lex_direct (cpp_reader *pfile)
}
}
/* Fall through. */
+ CPP_FALLTHRU ();
case '_':
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
@@ -2717,6 +2720,8 @@ _cpp_lex_direct (cpp_reader *pfile)
}
buffer->cur++;
}
+ /* XXX Really fallthru? */
+ CPP_FALLTHRU ();
default:
create_literal (pfile, result, buffer->cur - 1, 1, CPP_OTHER);
@@ -3323,6 +3328,7 @@ cpp_token_val_index (const cpp_token *tok)
else if (tok->type == CPP_PRAGMA)
return CPP_TOKEN_FLD_PRAGMA;
/* else fall through */
+ CPP_FALLTHRU ();
default:
return CPP_TOKEN_FLD_NONE;
}
@@ -2886,6 +2886,7 @@ parse_params (cpp_reader *pfile, cpp_macro *macro)
return true;
/* Fall through to pick up the error. */
+ CPP_FALLTHRU ();
case CPP_COMMA:
if (!prev_ident)
{
@@ -2937,6 +2938,7 @@ parse_params (cpp_reader *pfile, cpp_macro *macro)
if (token->type == CPP_CLOSE_PAREN)
return true;
/* Fall through. */
+ CPP_FALLTHRU ();
case CPP_EOF:
cpp_error (pfile, CPP_DL_ERROR, "missing ')' in macro parameter list");
@@ -55,6 +55,7 @@ write_macdef (cpp_reader *pfile, cpp_hashnode *hn, void *file_p)
case NT_VOID:
if (! (hn->flags & NODE_POISONED))
return 1;
+ CPP_FALLTHRU ();
case NT_MACRO:
if ((hn->flags & NODE_BUILTIN)
@@ -231,6 +232,7 @@ count_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p)
return 1;
/* else fall through. */
+ CPP_FALLTHRU ();
case NT_VOID:
{
@@ -270,6 +272,7 @@ write_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p)
return 1;
/* else fall through. */
+ CPP_FALLTHRU ();
case NT_VOID:
{