From: Eli Zaretskii <eliz@gnu.org>
To: Nicolas Avrutin <nicolasavru@gmail.com>
Cc: rudalics@gmx.at, dak@gnu.org, faried@gmail.com, emacs-devel@gnu.org
Subject: Re: Several problems
Date: Sat, 02 Aug 2014 09:57:29 +0300 [thread overview]
Message-ID: <83tx5vqsyu.fsf@gnu.org> (raw)
In-Reply-To: <87vbqbldz7.fsf@gateway.local.navru.net>
> From: Nicolas Avrutin <nicolasavru@gmail.com>
> Date: Sat, 02 Aug 2014 00:10:08 -0400
> Cc: David Kastrup <dak@gnu.org>, Faried Nawaz <faried@gmail.com>,
> emacs-devel@gnu.org
>
> Your patch fails to compile for me:
> frame.c: In function ‘make_initial_frame’:
> frame.c:863:40: error: lvalue required as left operand of assignment
> FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) = false;
> ^
> frame.c: In function ‘make_terminal_frame’:
> frame.c:916:40: error: lvalue required as left operand of assignment
> FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) = false;
> ^
>
>
> 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 frame.c
> macro expanding to false = 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 for 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 != 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 == vertical_scroll_bar_left)
#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \
((f)->vertical_scroll_bar_type == 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_scroll_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 = vertical_scroll_bar_none;
FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) = false;
#endif
IOW, it only treats FRAME_HAS_HORIZONTAL_SCROLL_BARS as an lvalue when
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.
next prev parent reply other threads:[~2014-08-02 6:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 11:24 Several problems David Kastrup
2014-07-28 12:09 ` Dmitry Antipov
2014-07-28 12:32 ` martin rudalics
2014-08-01 9:43 ` Nicolas Avrutin
2014-08-01 10:30 ` martin rudalics
2014-08-01 13:06 ` martin rudalics
2014-08-02 4:10 ` Nicolas Avrutin
2014-08-02 6:57 ` Eli Zaretskii [this message]
2014-08-02 7:28 ` Nicolas Avrutin
2014-08-02 7:39 ` Eli Zaretskii
2014-08-02 8:06 ` martin rudalics
2014-08-04 17:22 ` martin rudalics
2014-08-04 21:54 ` Nicolas Avrutin
2014-08-05 8:36 ` martin rudalics
2014-08-05 19:08 ` Faried Nawaz
2014-08-06 9:41 ` martin rudalics
-- strict thread matches above, loose matches on Subject: below --
2014-07-30 20:02 Ted Zlatanov
2014-07-30 20:10 ` Ted Zlatanov
2014-07-31 4:22 ` Dmitry Antipov
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=83tx5vqsyu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=faried@gmail.com \
--cc=nicolasavru@gmail.com \
--cc=rudalics@gmx.at \
/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.