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 20:08:51 +0200

> From: Fabrice Popineau <address@hidden>
> Date: Tue, 28 Feb 2012 23:39:46 +0100
> Cc: Eli Zaretskii <address@hidden>, AJMR <address@hidden>, address@hidden
> 
> > > There is something wrong around lib/strftime.c:946
> > >           if (negative_number)
> > >             u_number_value = - u_number_value;
> > >
> > > u_number_value being unsigned, this is wrong.
> >
> > I don't see anything wrong there.  The value of
> > -X is well-defined if X is unsigned int; it's
> > equivalent to ~X + 1.  Can you supply a test case
> > illustrating the actual bug?
> >
> >
> When my compiler issues a warning like :
> 
> unsigned.c
> unsigned.c(3) : warning C4146: unary minus operator applied to unsigned
> type, result still unsigned
> 
> I tend to care about it. If it is on purpose, then I'm ok with it albeit I
> would have prefered something less error prone
> (I mean human interpretation error :-) )

I agree that such confusing code, even if it does its job correctly,
is bad for maintainability.  At the very least, it warrants a comment
explaining why things are done that way.  Rewriting it not to negate
unsigned values with arithmetic operations would be even better.

> I did it because I'm using it this way, but that should be doable with
> MINGW x64 (or so I guess).
> With the MS tools, emacs does not compile out of the box. There are errors.
> There are also lots of warnings and when something does not work, I try to
> remove warnings first.

Please go on, I have no doubt that resolving these issues will make
the code cleaner and clearer, and of course will also help the MinGW64
build when the time comes.

> All in all,  at least for the record, it may help people who would need an
> emacs/x64/windows this way.

Right.  Thanks.



reply via email to

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