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/regex.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/regex.c')
| -rw-r--r-- | src/regex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/regex.c b/src/regex.c index 8e38a920cdb..ed848902086 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -2636,6 +2636,7 @@ regex_compile (const_re_char *pattern, size_t size, | |||
| 2636 | if ((syntax & RE_BK_PLUS_QM) | 2636 | if ((syntax & RE_BK_PLUS_QM) |
| 2637 | || (syntax & RE_LIMITED_OPS)) | 2637 | || (syntax & RE_LIMITED_OPS)) |
| 2638 | goto normal_char; | 2638 | goto normal_char; |
| 2639 | FALLTHROUGH; | ||
| 2639 | handle_plus: | 2640 | handle_plus: |
| 2640 | case '*': | 2641 | case '*': |
| 2641 | /* If there is no previous pattern... */ | 2642 | /* If there is no previous pattern... */ |
| @@ -3086,6 +3087,7 @@ regex_compile (const_re_char *pattern, size_t size, | |||
| 3086 | with non-0. */ | 3087 | with non-0. */ |
| 3087 | if (regnum == 0) | 3088 | if (regnum == 0) |
| 3088 | FREE_STACK_RETURN (REG_BADPAT); | 3089 | FREE_STACK_RETURN (REG_BADPAT); |
| 3090 | FALLTHROUGH; | ||
| 3089 | case '1': case '2': case '3': case '4': | 3091 | case '1': case '2': case '3': case '4': |
| 3090 | case '5': case '6': case '7': case '8': case '9': | 3092 | case '5': case '6': case '7': case '8': case '9': |
| 3091 | regnum = 10*regnum + (c - '0'); break; | 3093 | regnum = 10*regnum + (c - '0'); break; |
| @@ -3905,8 +3907,7 @@ analyze_first (const_re_char *p, const_re_char *pend, char *fastmap, | |||
| 3905 | j < (1 << BYTEWIDTH); j++) | 3907 | j < (1 << BYTEWIDTH); j++) |
| 3906 | fastmap[j] = 1; | 3908 | fastmap[j] = 1; |
| 3907 | } | 3909 | } |
| 3908 | 3910 | FALLTHROUGH; | |
| 3909 | /* Fallthrough */ | ||
| 3910 | case charset: | 3911 | case charset: |
| 3911 | if (!fastmap) break; | 3912 | if (!fastmap) break; |
| 3912 | not = (re_opcode_t) *(p - 1) == charset_not; | 3913 | not = (re_opcode_t) *(p - 1) == charset_not; |
| @@ -6182,8 +6183,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1, | |||
| 6182 | case on_failure_jump_nastyloop: | 6183 | case on_failure_jump_nastyloop: |
| 6183 | assert ((re_opcode_t)pat[-2] == no_op); | 6184 | assert ((re_opcode_t)pat[-2] == no_op); |
| 6184 | PUSH_FAILURE_POINT (pat - 2, str); | 6185 | PUSH_FAILURE_POINT (pat - 2, str); |
| 6185 | /* Fallthrough */ | 6186 | FALLTHROUGH; |
| 6186 | |||
| 6187 | case on_failure_jump_loop: | 6187 | case on_failure_jump_loop: |
| 6188 | case on_failure_jump: | 6188 | case on_failure_jump: |
| 6189 | case succeed_n: | 6189 | case succeed_n: |