From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs release branch warnings with GCC 8
Date: Mon, 30 Apr 2018 17:22:16 -0700 [thread overview]
Message-ID: <c33df2a9-a62c-fc9a-8cf5-e35949cedf5d@cs.ucla.edu> (raw)
In-Reply-To: <83tvrsqxel.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
On 04/30/2018 12:58 PM, Eli Zaretskii wrote:
> I'd prefer to leave -Wsuggest-attribute=malloc out on the release
> branch, for now.
OK, I installed the attached backport into the emacs-26 branch; it does
the minimum to silence the diagnostics, without adding the new GCC 8
warning options.
[-- Attachment #2: 0001-Port-enable-gcc-warnings-to-GCC-8.patch --]
[-- Type: text/x-patch, Size: 2448 bytes --]
From 65ac27783a959a8339c2aab0f1e54d9b508a1f1f Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Mon, 30 Apr 2018 17:17:11 -0700
Subject: [PATCH] Port --enable-gcc-warnings to GCC 8
Backport from master.
* lib-src/emacsclient.c (fail):
Do not dereference a null pointer.
* src/frame.c (delete_frame):
Add a decl with UNINIT to work around GCC bug 85563.
* src/menu.h (finish_menu_items):
Do not use attribute const.
* src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.
---
lib-src/emacsclient.c | 2 +-
src/frame.c | 1 +
| 2 +-
src/regex.c | 3 +--
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 574bec850f..b139b2fe3f 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -700,7 +700,7 @@ fail (void)
{
size_t extra_args_size = (main_argc - optind + 1) * sizeof (char *);
size_t new_argv_size = extra_args_size;
- char **new_argv = NULL;
+ char **new_argv = xmalloc (new_argv_size);
char *s = xstrdup (alternate_editor);
unsigned toks = 0;
diff --git a/src/frame.c b/src/frame.c
index cee775c6fa..0a6ca26f5d 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1933,6 +1933,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
if (f == sf)
{
Lisp_Object tail;
+ Lisp_Object frame1 UNINIT; /* This line works around GCC bug 85563. */
eassume (CONSP (Vframe_list));
/* Look for another visible frame on the same terminal.
--git a/src/menu.h b/src/menu.h
index 4c4ac83424..1aa53f7454 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -30,7 +30,7 @@ enum {
};
extern void init_menu_items (void);
-extern void finish_menu_items (void) ATTRIBUTE_CONST;
+extern void finish_menu_items (void);
extern void discard_menu_items (void);
extern void save_menu_items (void);
extern bool parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object);
diff --git a/src/regex.c b/src/regex.c
index e8b99f6f02..4f9df68a9f 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -4038,8 +4038,7 @@ analyze_first (const_re_char *p, const_re_char *pend, char *fastmap,
};
/* Keep `p1' to allow the `on_failure_jump' we are jumping to
to jump back to "just after here". */
- /* Fallthrough */
-
+ FALLTHROUGH;
case on_failure_jump:
case on_failure_keep_string_jump:
case on_failure_jump_nastyloop:
--
2.17.0
prev parent reply other threads:[~2018-05-01 0:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 17:12 Emacs release branch warnings with GCC 8 Paul Eggert
2018-04-30 19:38 ` Eli Zaretskii
2018-04-30 19:52 ` Paul Eggert
2018-04-30 19:58 ` Eli Zaretskii
2018-05-01 0:22 ` Paul Eggert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c33df2a9-a62c-fc9a-8cf5-e35949cedf5d@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.