Subject: bug#20756: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type

From: Paul Eggert <[email-masked]>
Date: Tue, 23 Jun 2015 18:05:27 -0700

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).
>From 4fe5cb43d9c27da933b6e6a1beedb14eba4db4e9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
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