emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffer size limitation in insdel.c


From: Lars Magne Ingebrigtsen
Subject: Re: Buffer size limitation in insdel.c
Date: Thu, 23 Sep 2010 16:31:21 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Lars Magne Ingebrigtsen <address@hidden> 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.)
  address@hidden * Lars Magne Ingebrigtsen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]