diff options
| author | Paul Eggert | 2017-07-05 17:14:50 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-07-05 18:59:30 -0700 |
| commit | 24faf6b0d2fe990e9334dd2e3238f749fec87897 (patch) | |
| tree | 75c08c685af53e266490eac86408c066f79cf94d | |
| parent | 94b2e1fc00f90b4072b4a998caf2054c540b7ac4 (diff) | |
| download | emacs-24faf6b0d2fe990e9334dd2e3238f749fec87897.tar.gz emacs-24faf6b0d2fe990e9334dd2e3238f749fec87897.zip | |
Don’t use -Woverride-init
I have some further changes in mind that would also need to
disable the -Woverride-init warnings. In practice these warnings
seem to be more trouble than they’re worth, so disable them in the
cc command line.
* configure.ac: Disable -Woverride-init here ...
* src/bytecode.c: ... rather than here.
| -rw-r--r-- | configure.ac | 5 | ||||
| -rw-r--r-- | src/bytecode.c | 12 |
2 files changed, 4 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index ef61107b025..980b4c633ba 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -957,6 +957,7 @@ AS_IF([test $gl_gcc_warnings = no], | |||
| 957 | # This part is merely for shortening the command line, | 957 | # This part is merely for shortening the command line, |
| 958 | # since -Wno-FOO needs to be added below regardless. | 958 | # since -Wno-FOO needs to be added below regardless. |
| 959 | nw="$nw -Wmissing-field-initializers" | 959 | nw="$nw -Wmissing-field-initializers" |
| 960 | nw="$nw -Woverride-init" | ||
| 960 | nw="$nw -Wtype-limits" | 961 | nw="$nw -Wtype-limits" |
| 961 | nw="$nw -Wunused-parameter" | 962 | nw="$nw -Wunused-parameter" |
| 962 | 963 | ||
| @@ -978,6 +979,7 @@ AS_IF([test $gl_gcc_warnings = no], | |||
| 978 | done | 979 | done |
| 979 | gl_WARN_ADD([-Wredundant-decls]) # Prefer this, as we don't use Bison. | 980 | gl_WARN_ADD([-Wredundant-decls]) # Prefer this, as we don't use Bison. |
| 980 | gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one | 981 | gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one |
| 982 | gl_WARN_ADD([-Wno-override-init]) # More trouble than it is worth | ||
| 981 | gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now | 983 | gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now |
| 982 | gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now | 984 | gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now |
| 983 | gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now | 985 | gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now |
| @@ -1005,9 +1007,10 @@ AS_IF([test $gl_gcc_warnings = no], | |||
| 1005 | ]) | 1007 | ]) |
| 1006 | ]) | 1008 | ]) |
| 1007 | 1009 | ||
| 1008 | # clang is unduly picky about these regardless of whether | 1010 | # clang is picky about these regardless of whether |
| 1009 | # --enable-gcc-warnings is specified. | 1011 | # --enable-gcc-warnings is specified. |
| 1010 | if test "$emacs_cv_clang" = yes; then | 1012 | if test "$emacs_cv_clang" = yes; then |
| 1013 | gl_WARN_ADD([-Wno-initializer-overrides]) | ||
| 1011 | gl_WARN_ADD([-Wno-tautological-compare]) | 1014 | gl_WARN_ADD([-Wno-tautological-compare]) |
| 1012 | gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare]) | 1015 | gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare]) |
| 1013 | fi | 1016 | fi |
diff --git a/src/bytecode.c b/src/bytecode.c index e781a87d16f..a473dfb9c8c 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -452,14 +452,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 452 | the table clearer. */ | 452 | the table clearer. */ |
| 453 | #define LABEL(OP) [OP] = &&insn_ ## OP | 453 | #define LABEL(OP) [OP] = &&insn_ ## OP |
| 454 | 454 | ||
| 455 | #if GNUC_PREREQ (4, 6, 0) | ||
| 456 | # pragma GCC diagnostic push | ||
| 457 | # pragma GCC diagnostic ignored "-Woverride-init" | ||
| 458 | #elif defined __clang__ | ||
| 459 | # pragma GCC diagnostic push | ||
| 460 | # pragma GCC diagnostic ignored "-Winitializer-overrides" | ||
| 461 | #endif | ||
| 462 | |||
| 463 | /* This is the dispatch table for the threaded interpreter. */ | 455 | /* This is the dispatch table for the threaded interpreter. */ |
| 464 | static const void *const targets[256] = | 456 | static const void *const targets[256] = |
| 465 | { | 457 | { |
| @@ -471,10 +463,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 471 | #undef DEFINE | 463 | #undef DEFINE |
| 472 | }; | 464 | }; |
| 473 | 465 | ||
| 474 | #if GNUC_PREREQ (4, 6, 0) || defined __clang__ | ||
| 475 | # pragma GCC diagnostic pop | ||
| 476 | #endif | ||
| 477 | |||
| 478 | #endif | 466 | #endif |
| 479 | 467 | ||
| 480 | 468 | ||