From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Several problems Date: Sat, 02 Aug 2014 09:57:29 +0300 Message-ID: <83tx5vqsyu.fsf@gnu.org> References: <87d2cpbua7.fsf@fencepost.gnu.org> <53D642D8.4050502@gmx.at> <87fvhg1pxi.fsf@gateway.local.navru.net> <53DB90EB.9030808@gmx.at> <87vbqbldz7.fsf@gateway.local.navru.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1406962679 30379 80.91.229.3 (2 Aug 2014 06:57:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Aug 2014 06:57:59 +0000 (UTC) Cc: rudalics@gmx.at, dak@gnu.org, faried@gmail.com, emacs-devel@gnu.org To: Nicolas Avrutin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 02 08:57:52 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XDTGI-0007fn-J0 for ged-emacs-devel@m.gmane.org; Sat, 02 Aug 2014 08:57:50 +0200 Original-Received: from localhost ([::1]:43196 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDTGI-00073u-5y for ged-emacs-devel@m.gmane.org; Sat, 02 Aug 2014 02:57:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDTG9-00073a-NR for emacs-devel@gnu.org; Sat, 02 Aug 2014 02:57:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDTG3-0002By-Qr for emacs-devel@gnu.org; Sat, 02 Aug 2014 02:57:41 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:41396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDTFx-000293-76; Sat, 02 Aug 2014 02:57:29 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N9O00L002WMWP00@mtaout26.012.net.il>; Sat, 02 Aug 2014 09:53:50 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N9O00GIC35Q6850@mtaout26.012.net.il>; Sat, 02 Aug 2014 09:53:50 +0300 (IDT) In-reply-to: <87vbqbldz7.fsf@gateway.local.navru.net> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173364 Archived-At: > From: Nicolas Avrutin > Date: Sat, 02 Aug 2014 00:10:08 -0400 > Cc: David Kastrup , Faried Nawaz , > =09emacs-devel@gnu.org >=20 > Your patch fails to compile for me: > frame.c: In function =E2=80=98make_initial_frame=E2=80=99: > frame.c:863:40: error: lvalue required as left operand of assignmen= t > FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) =3D false; > ^ > frame.c: In function =E2=80=98make_terminal_frame=E2=80=99: > frame.c:916:40: error: lvalue required as left operand of assignmen= t > FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) =3D false; > ^ >=20 >=20 > With your patch, FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) is defined to = be > false (the else branch, frame.h:858), resulting in the lines in fra= me.c > macro expanding to false =3D false; How can this happen? The definition of FRAME_HAS_HORIZONTAL_SCROLL_BARS on frame.h is this: #ifdef HAVE_WINDOW_SYSTEM /* This frame slot says whether scroll bars are currently enabled f= or frame F, and which side they are on. */ #define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((f)->vertical_scroll_bar= _type) #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ ((f)->vertical_scroll_bar_type !=3D vertical_scroll_bar_none) #define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \ ((f)->horizontal_scroll_bars) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) \ ((f)->vertical_scroll_bar_type =3D=3D vertical_scroll_bar_left) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \ ((f)->vertical_scroll_bar_type =3D=3D vertical_scroll_bar_right) #else /* not HAVE_WINDOW_SYSTEM */ /* If there is no window system, there are no scroll bars. */ #define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((void) f, vertical_scrol= l_bar_none) #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((void) f, 0) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) ((void) f, 0) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) ((void) f, 0) #define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) ((void) f, 0) #endif /* HAVE_WINDOW_SYSTEM */ IOW, it is only defined as a constant zero when HAVE_WINDOW_SYSTEM is _not_ defined. Whereas line 863 of frame.c is this: #ifdef HAVE_WINDOW_SYSTEM f->vertical_scroll_bar_type =3D vertical_scroll_bar_none; FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) =3D false; #endif IOW, it only treats FRAME_HAS_HORIZONTAL_SCROLL_BARS as an lvalue whe= n HAVE_WINDOW_SYSTEM _is_ defined. And in that case, the definition of FRAME_HAS_HORIZONTAL_SCROLL_BARS is not a constant. So please look closer at your sources and try to figure out what caused this strange problem.