summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-05-16 10:24:19 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-05-16 10:27:41 -0700
commit2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f (patch)
tree869b2d36a6a07dca857254202d620358c004489f /src/syntax.c
parent138c8256f41f242341c7d146c99f4e6fa267a638 (diff)
downloademacs-2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f.tar.gz
Merge with gnulib, pacifying GCC 7
This incorporates: 2017-05-16 manywarnings: update for GCC 7 2017-05-15 sys_select: Avoid "was expanded before it was required" * configure.ac (nw): Suppress GCC 7’s new -Wduplicated-branches and -Wformat-overflow=2 options, due to too many false alarms. * doc/misc/texinfo.tex, lib/strftime.c, m4/manywarnings.m4: Copy from gnulib. * m4/gnulib-comp.m4: Regenerate. * src/coding.c (decode_coding_iso_2022): Fix bug uncovered by -Wimplicit-fallthrough. * src/conf_post.h (FALLTHROUGH): New macro. Use it to mark all switch cases that fall through. * src/editfns.c (styled_format): Use !, not ~, on bool. * src/gtkutil.c (xg_check_special_colors): When using sprintf, don’t trust Gtk to output colors in [0, 1] range. (xg_update_scrollbar_pos): Avoid use of possibly-uninitialized bool; this bug was actually caught by Clang. * src/search.c (boyer_moore): Tell GCC that CHAR_BASE, if nonzero, must be a non-ASCII character. * src/xterm.c (x_draw_glyphless_glyph_string_foreground): Tell GCC that glyph->u.glyphless.ch must be a character.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 7aa43e6e5c7..dcaca22f0e2 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -810,6 +810,7 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
case Sstring_fence:
case Scomment_fence:
c = (code == Sstring_fence ? ST_STRING_STYLE : ST_COMMENT_STYLE);
+ FALLTHROUGH;
case Sstring:
/* Track parity of quotes. */
if (string_style == -1)
@@ -2690,6 +2691,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
goto lose;
INC_BOTH (from, from_byte);
/* Treat following character as a word constituent. */
+ FALLTHROUGH;
case Sword:
case Ssymbol:
if (depth || !sexpflag) break;
@@ -2721,7 +2723,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
case Scomment_fence:
comstyle = ST_COMMENT_STYLE;
- /* FALLTHROUGH */
+ FALLTHROUGH;
case Scomment:
if (!parse_sexp_ignore_comments) break;
UPDATE_SYNTAX_TABLE_FORWARD (from);
@@ -2753,7 +2755,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
goto close1;
}
mathexit = 1;
-
+ FALLTHROUGH;
case Sopen:
if (!++depth) goto done;
break;
@@ -2909,7 +2911,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
goto open2;
}
mathexit = 1;
-
+ FALLTHROUGH;
case Sclose:
if (!++depth) goto done2;
break;