emacs-devel
[Top][All Lists]
Advanced

[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 23:24:42 +0200

> Date: Wed, 29 Feb 2012 11:43:28 -0800
> From: Paul Eggert <address@hidden>
> CC: address@hidden, address@hidden, 
>  address@hidden
> 
> >> 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?
> 
> As Fabrice explained, the warning is about code that is never executed
> on his platform, because it's inside a conditional that is always
> false, and so the bug cannot possibly occur.
> 
> The conditional itself is a constant, and decent compiler
> will optimize away the code in question.  The conditional is present
> precisely to avoid the overflow that the compiler is mistakenly warning
> about.  There is no easy way to rewrite the code that will both
> pacify the broken compiler and keep the code modular and portable.

Thanks for explaining this.

> > If some compiler tells us something valuable about the code, we
> > need not ignore it just because it's "third-party".
> 
> True, but it appears that many of the fixes in his patch are to
> pacify warnings like the above.

Which ones are those?  I see many changes that qualify existing
declarations with `const', which cannot possibly be wrong.  I also see
replacements of `unsigned long' with a `size_t', which cannot be
wrong, either.  Using ptrdiff_t instead of long or some such is
required for LLP64 platforms.  Most of the rest is in Windows-specific
files.

So which fixes are for the bogus warnings?



reply via email to

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