From: Paul Eggert <eggert@cs.ucla.edu>
To: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: 17026@debbugs.gnu.org, 13486@debbugs.gnu.org, 20756@debbugs.gnu.org
Subject: bug#17026: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type
Date: Tue, 23 Jun 2015 18:05:27 -0700 [thread overview]
Message-ID: <558A0257.8000600@cs.ucla.edu> (raw)
In-Reply-To: <wlh9pxapqe.wl%mituharu@math.s.chiba-u.ac.jp>
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]
YAMAMOTO Mitsuharu wrote:
> ../../../emacs/trunk/src/keyboard.h:461: error: expected specifier-qualifier-list before ‘*’ token
Thanks, it appears I was assuming C11 semantics that clang doesn't support. I
installed the attached further patch, which worked for me with clang
3.6.0-2ubuntu1 (Ubuntu 15.04).
[-- Attachment #2: 0001-Port-selection-info-fix-to-clang.patch --]
[-- Type: text/x-diff, Size: 1035 bytes --]
From 4fe5cb43d9c27da933b6e6a1beedb14eba4db4e9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 23 Jun 2015 18:01:55 -0700
Subject: [PATCH] Port selection info fix to clang
* src/keyboard.h (kbd_buffer_store_event_hold):
Don't assume C11 semantics for alignof (Bug#20756).
---
src/keyboard.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/keyboard.h b/src/keyboard.h
index 5278051..1b489f3 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -458,7 +458,8 @@ kbd_buffer_store_event_hold (struct input_event *event,
struct input_event *hold_quit)
{
union buffered_input_event *ev = (union buffered_input_event *) event;
- verify (sizeof *event == sizeof *ev && alignof (*event) == alignof (*ev));
+ verify (alignof (struct input_event) == alignof (union buffered_input_event)
+ && sizeof (struct input_event) == sizeof (union buffered_input_event));
return kbd_buffer_store_buffered_event ((union buffered_input_event *) event,
hold_quit);
}
--
2.1.4
next prev parent reply other threads:[~2015-06-24 1:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 14:22 bug#13486: 24.2.92: large X-selections: timed out waiting for property notify event Charles Rendleman
2013-01-18 20:29 ` Glenn Morris
[not found] ` <CALiJhZ4HoOgSxq3z_08iwiq7BR0+rT0RN8tybGO-+MG7ryTXWA@mail.gmail.com>
2013-01-19 1:46 ` Glenn Morris
2013-01-19 5:44 ` Chong Yidong
[not found] ` <CALiJhZ5BdYmGk-hBM1kwOFgT-guw_PZwHcLOtuj0TMhU0Xv1Dw@mail.gmail.com>
2013-01-19 15:41 ` Chong Yidong
2013-01-19 17:19 ` Stefan Monnier
2013-01-19 21:55 ` Charles Rendleman
2013-05-15 21:28 ` unfrostedpoptart
2014-07-21 3:11 ` Dmitry Gutov
2014-10-08 19:50 ` Steve Newcomb
2014-10-08 21:34 ` Stefan Monnier
2015-06-23 23:44 ` bug#13486: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type Paul Eggert
2015-06-24 0:56 ` YAMAMOTO Mitsuharu
2015-06-24 1:05 ` Paul Eggert [this message]
2015-06-24 1:20 ` YAMAMOTO Mitsuharu
2020-09-13 15:53 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=558A0257.8000600@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=13486@debbugs.gnu.org \
--cc=17026@debbugs.gnu.org \
--cc=20756@debbugs.gnu.org \
--cc=mituharu@math.s.chiba-u.ac.jp \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).