From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Buffer size limitation in insdel.c Date: Thu, 23 Sep 2010 16:31:21 +0200 Organization: Programmerer Ingebrigtsen Message-ID: References: <834odivv7v.fsf@gnu.org> <83r5gkvqpf.fsf@gnu.org> <83iq1wvep4.fsf@gnu.org> <83hbhgvblq.fsf@gnu.org> <83fwx0v97g.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1285252313 16669 80.91.229.12 (23 Sep 2010 14:31:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Sep 2010 14:31:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 23 16:31:50 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 1Oympx-0006qn-5Z for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2010 16:31:49 +0200 Original-Received: from localhost ([127.0.0.1]:35728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oympw-00038j-Co for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2010 10:31:48 -0400 Original-Received: from [140.186.70.92] (port=50707 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oympl-00037D-3o for emacs-devel@gnu.org; Thu, 23 Sep 2010 10:31:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oympf-0003CW-Kg for emacs-devel@gnu.org; Thu, 23 Sep 2010 10:31:36 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:49027) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oympf-0003BS-BC for emacs-devel@gnu.org; Thu, 23 Sep 2010 10:31:31 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oympd-0006g6-Ki for emacs-devel@gnu.org; Thu, 23 Sep 2010 16:31:29 +0200 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Sep 2010 16:31:29 +0200 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Sep 2010 16:31:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 28 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAKlBMVEVvCQ3AcU7ClWrWvJFj AAlMAAmGNBBJAAmBGxXj2dehUD1/Aw5GAAf8/PuUk3orAAACTElEQVQ4jZXRzWsaQRQA8LWHshh7 WCVQxD3UpVRFD6n0oLCHQttDk4OFUkrJIb2I4Obac22JNY2H1j2NMNDdg5hNhQj245BD86VGK4Sd g0xg/pe+2RU/EhU6u+yw89v33r4ZoROwglbP8tYLq4WaVfpULGvrof5qTrhglLEGaxCVMrgxu9LW 7xr3AUiY4gZOMAyrlMrE1rzxgzCAbTKWwCos8qHatnYroMciwgW8YRiIUAJ3AyI8ETtcF05QpRJF ++hhUv9adWusSGuPcsIpruinqIL0j/rul/zTI/FIWwn1H+SEAUnSAYF0MpMvXRBD/fgIbMqojNXL cQQHKA5AscrwTARvEPEmcQLTAwd+O9BL3VP4FVNMRQkK5ds7WtFNNfra5hNDwztsnxHC6tCgSTBP A13jaGq4jRPwOwCdBHGAcYjtDhs4jSsMYOBsiYqRM9ErlSGd8lSwJQh2JJpGiMIiYzJ1a/T0FKyv oWozkIol0z7xl/Y51IXz2Oa98dJNno5M+jiB35RZyqZwVlFKfBMgClZValO/qlaT0wARPBVxU02g Y5rBY8PyR5qmYoUjE2ib3mz3dfZZpqB5avknPvHHCF74/dKxJNUkPgzJL0lBF94YEofsWwecpwt/ P7QP+2cr7fOm9nwrn/GJO5Cqy6Ewhsff8i83nBrTcAawNQ/OF8FUxE+A/Ay8vwatEXhK/wllT2lv bg3fDWiNYX6qZREzYEygeAP+ONBcApkNsbUowoHQ/Ijvs7DJYVM8XA5wHsa7RfAKYO8axHP/AHpq VQN8S/cLAAAAAElFTkSuQmCC Mail-Copies-To: never X-Now-Playing: Various's _Crammed Global Soundclash 1980-89, Part One: World Fusion_: "Bel Canto - The Glassmaker" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:39oS59MMD+eXyuxKgYemadAX8jY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:130668 Archived-At: Lars Magne Ingebrigtsen 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