[Top][All Lists]

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

Re: Windows 64 port

From: Eli Zaretskii
Subject: Re: Windows 64 port
Date: Wed, 29 Feb 2012 20:04:24 +0200

> Date: Tue, 28 Feb 2012 14:09:03 -0800
> From: Paul Eggert <address@hidden>
> CC: Eli Zaretskii <address@hidden>, AJMR <address@hidden>, 
>  address@hidden
> > In src/dispnew.c:6402, height and width should probably be unsigned. The
> > checking by
> > INT_ADD_RANGE_OVERFLOW results in a compiler warning about integral
> > constant overflow
> > because it tries to compute (INTMIN - 2) which obviously is out of range.
> > The value is not used in this case, but the compiler may emit the warning
> > anyway.
> We don't need to modify the mainline Emacs code in order to
> pacify third-party compilers that issue incorrect warnings.

What is incorrect about that warning?  Did Fabrice describe the issue
incorrectly?  If so, would you mind explaining where his reasoning
about the validity of INT_MIN - 2 was wrong?

> We can safely ignore these warnings and leave the code alone.

We don't need to, but we might consider that anyway.  If some
compiler tells us something valuable about the code, we
need not ignore it just because it's "third-party".  My experience is
similar to that of Fabrice: compiling a program with several different
compilers helps find more problematic, unclean, and unsafe code.  I'm
quite sure I saw this advice in some textbooks.

reply via email to

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