diff options
| author | Paul Eggert | 2017-05-16 10:24:19 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-05-16 10:27:41 -0700 |
| commit | 2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f (patch) | |
| tree | 869b2d36a6a07dca857254202d620358c004489f /src/syntax.c | |
| parent | 138c8256f41f242341c7d146c99f4e6fa267a638 (diff) | |
| download | emacs-2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f.tar.gz emacs-2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f.zip | |
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.c | 8 |
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, | |||
| 810 | case Sstring_fence: | 810 | case Sstring_fence: |
| 811 | case Scomment_fence: | 811 | case Scomment_fence: |
| 812 | c = (code == Sstring_fence ? ST_STRING_STYLE : ST_COMMENT_STYLE); | 812 | c = (code == Sstring_fence ? ST_STRING_STYLE : ST_COMMENT_STYLE); |
| 813 | FALLTHROUGH; | ||
| 813 | case Sstring: | 814 | case Sstring: |
| 814 | /* Track parity of quotes. */ | 815 | /* Track parity of quotes. */ |
| 815 | if (string_style == -1) | 816 | if (string_style == -1) |
| @@ -2690,6 +2691,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag) | |||
| 2690 | goto lose; | 2691 | goto lose; |
| 2691 | INC_BOTH (from, from_byte); | 2692 | INC_BOTH (from, from_byte); |
| 2692 | /* Treat following character as a word constituent. */ | 2693 | /* Treat following character as a word constituent. */ |
| 2694 | FALLTHROUGH; | ||
| 2693 | case Sword: | 2695 | case Sword: |
| 2694 | case Ssymbol: | 2696 | case Ssymbol: |
| 2695 | if (depth || !sexpflag) break; | 2697 | if (depth || !sexpflag) break; |
| @@ -2721,7 +2723,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag) | |||
| 2721 | 2723 | ||
| 2722 | case Scomment_fence: | 2724 | case Scomment_fence: |
| 2723 | comstyle = ST_COMMENT_STYLE; | 2725 | comstyle = ST_COMMENT_STYLE; |
| 2724 | /* FALLTHROUGH */ | 2726 | FALLTHROUGH; |
| 2725 | case Scomment: | 2727 | case Scomment: |
| 2726 | if (!parse_sexp_ignore_comments) break; | 2728 | if (!parse_sexp_ignore_comments) break; |
| 2727 | UPDATE_SYNTAX_TABLE_FORWARD (from); | 2729 | UPDATE_SYNTAX_TABLE_FORWARD (from); |
| @@ -2753,7 +2755,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag) | |||
| 2753 | goto close1; | 2755 | goto close1; |
| 2754 | } | 2756 | } |
| 2755 | mathexit = 1; | 2757 | mathexit = 1; |
| 2756 | 2758 | FALLTHROUGH; | |
| 2757 | case Sopen: | 2759 | case Sopen: |
| 2758 | if (!++depth) goto done; | 2760 | if (!++depth) goto done; |
| 2759 | break; | 2761 | break; |
| @@ -2909,7 +2911,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag) | |||
| 2909 | goto open2; | 2911 | goto open2; |
| 2910 | } | 2912 | } |
| 2911 | mathexit = 1; | 2913 | mathexit = 1; |
| 2912 | 2914 | FALLTHROUGH; | |
| 2913 | case Sclose: | 2915 | case Sclose: |
| 2914 | if (!++depth) goto done2; | 2916 | if (!++depth) goto done2; |
| 2915 | break; | 2917 | break; |