aboutsummaryrefslogtreecommitdiffstats
path: root/src/conf_post.h
diff options
context:
space:
mode:
authorPaul Eggert2017-05-16 10:24:19 -0700
committerPaul Eggert2017-05-16 10:27:41 -0700
commit2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f (patch)
tree869b2d36a6a07dca857254202d620358c004489f /src/conf_post.h
parent138c8256f41f242341c7d146c99f4e6fa267a638 (diff)
downloademacs-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/conf_post.h')
-rw-r--r--src/conf_post.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_post.h b/src/conf_post.h
index 95ebd5511ca..4fc0428df5a 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -244,6 +244,12 @@ extern int emacs_setenv_TZ (char const *);
244# define ATTRIBUTE_FORMAT(spec) /* empty */ 244# define ATTRIBUTE_FORMAT(spec) /* empty */
245#endif 245#endif
246 246
247#if GNUC_PREREQ (7, 0, 0)
248# define FALLTHROUGH __attribute__ ((__fallthrough__))
249#else
250# define FALLTHROUGH ((void) 0)
251#endif
252
247#if GNUC_PREREQ (4, 4, 0) && defined __GLIBC_MINOR__ 253#if GNUC_PREREQ (4, 4, 0) && defined __GLIBC_MINOR__
248# define PRINTF_ARCHETYPE __gnu_printf__ 254# define PRINTF_ARCHETYPE __gnu_printf__
249#elif GNUC_PREREQ (4, 4, 0) && defined __MINGW32__ 255#elif GNUC_PREREQ (4, 4, 0) && defined __MINGW32__