From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Re: Buffer size limitation in insdel.c
Date: Thu, 23 Sep 2010 16:31:21 +0200 [thread overview]
Message-ID: <m3zkv8mszq.fsf@quimbies.gnus.org> (raw)
In-Reply-To: m362xwo7zt.fsf@quimbies.gnus.org
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> So the warning is incorrect -- it's no longer a Lisp_Object at that
> point. But it's correct in that it's a potentially problematic
> conversion.
Yup. It's just naming the original type before the cast, apparently.
Like here:
dispnew.c:520: warning: conversion to 'int' from 'Lisp_Object' may alter its value
int width = XFASTINT (w->total_cols);
While stuff that's already EMACS_INT get the more correct warning:
dispnew.c:4708: warning: conversion to 'int' from 'long int' may alter its value
int preempt_count = baud_rate / 2400 + 1;
I think you're right that it might be more productive to just read the
code than using -Wconversion. That means that we'll never be able to
get the compiler to warn us the next time somebody writes int i = Z;,
which is a shame. Compilers are really good at finding type errors.
:-)
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
next prev parent reply other threads:[~2010-09-23 14:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-22 12:06 Buffer size limitation in insdel.c Eli Zaretskii
2010-09-22 12:12 ` Lars Magne Ingebrigtsen
2010-09-22 15:20 ` Eli Zaretskii
2010-09-22 12:16 ` David Kastrup
2010-09-23 0:06 ` Stefan Monnier
2010-09-23 0:58 ` Richard Stallman
2010-09-23 7:55 ` Eli Zaretskii
2010-09-23 9:23 ` Leo
2010-09-23 9:30 ` Eli Zaretskii
2010-09-23 10:59 ` Lars Magne Ingebrigtsen
2010-09-23 12:15 ` Eli Zaretskii
2010-09-23 12:18 ` Lars Magne Ingebrigtsen
2010-09-23 12:47 ` Lars Magne Ingebrigtsen
2010-09-23 13:12 ` Andreas Schwab
2010-09-23 13:22 ` Eli Zaretskii
2010-09-23 13:37 ` Lars Magne Ingebrigtsen
2010-09-23 14:13 ` Eli Zaretskii
2010-09-23 14:21 ` Lars Magne Ingebrigtsen
2010-09-23 14:31 ` Lars Magne Ingebrigtsen [this message]
2010-09-23 14:41 ` Eli Zaretskii
2010-09-23 14:49 ` Lars Magne Ingebrigtsen
2010-09-23 15:08 ` Lars Magne Ingebrigtsen
2010-09-23 18:56 ` Eli Zaretskii
2010-09-23 19:02 ` Lars Magne Ingebrigtsen
2010-09-23 19:22 ` Eli Zaretskii
2010-09-24 14:09 ` Richard Stallman
2010-09-24 14:28 ` Eli Zaretskii
2010-09-24 14:38 ` Lars Magne Ingebrigtsen
2010-09-25 13:55 ` Eli Zaretskii
2010-09-25 16:26 ` Lars Magne Ingebrigtsen
2010-09-25 16:38 ` Lars Magne Ingebrigtsen
2010-09-25 9:40 ` Richard Stallman
2010-09-25 10:00 ` Eli Zaretskii
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=m3zkv8mszq.fsf@quimbies.gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
/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.