From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Type-error in C code Date: Fri, 12 Nov 2010 09:02:10 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1289570566 5089 80.91.229.12 (12 Nov 2010 14:02:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 12 Nov 2010 14:02:46 +0000 (UTC) Cc: Jan =?iso-8859-1?Q?Dj=E4rv?= , emacs-devel@gnu.org To: Julien Danjou , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 12 15:02:39 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PGuD6-00014F-RO for ged-emacs-devel@m.gmane.org; Fri, 12 Nov 2010 15:02:38 +0100 Original-Received: from localhost ([127.0.0.1]:37716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGuD5-00047r-H2 for ged-emacs-devel@m.gmane.org; Fri, 12 Nov 2010 09:02:35 -0500 Original-Received: from [140.186.70.92] (port=59194 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGuCu-00046C-Ig for emacs-devel@gnu.org; Fri, 12 Nov 2010 09:02:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGuCt-0004Ur-8y for emacs-devel@gnu.org; Fri, 12 Nov 2010 09:02:24 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:24207 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGuCt-0004UI-4H for emacs-devel@gnu.org; Fri, 12 Nov 2010 09:02:23 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnAGAB7Y3ExMCpqE/2dsb2JhbAChV3lyvj+FSgSEWo1f X-IronPort-AV: E=Sophos;i="4.59,188,1288584000"; d="scan'208";a="82332718" Original-Received: from 76-10-154-132.dsl.teksavvy.com (HELO pastel.home) ([76.10.154.132]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 12 Nov 2010 09:02:10 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 818E7A86F8; Fri, 12 Nov 2010 09:02:10 -0500 (EST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132567 Archived-At: The following code installed by the recent atom-change has a type-error: static void set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value) { struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (frame)); x_send_client_event (frame, make_number (0), frame, dpyinfo->Xatom_net_wm_state, make_number (32), /* 1 = add, 0 = remove */ Fcons (make_number (add ? 1 : 0), Fcons (atom, value != 0 ? value : Qnil))); } The error is to put an "Atom" into a cons cell: those can only hold Lisp_Objects. The usual compilation flags won't catch the error because both types are actually some kind of integer, but if you compile --enable-use-lisp-union-type, the C compiler will dutyfully burp. Stefan