GNU bug report logs -
#720
Patch to fix CVS Emacs compilation error on Windows XP SP2.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 720 in the body.
You can then email your comments to 720 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#720
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Francis Litterio <flitterio <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
When building CVS Emacs on Windows XP SP2 using Visual Studio 6.0, the
following patch is needed to prevent the compiler from displaying an
error about unsigned __int64 not being convertable to double.
--
Fran
--- w32.c~ 2008-08-11 13:51:58.372421800 -0400
+++ w32.c 2008-08-14 12:54:29.192936600 -0400
@@ -3817,7 +3817,7 @@
attrs);
if (global_memory_status_ex (&memstex))
- totphys = memstex.ullTotalPhys / 1024.0;
+ totphys = (signed __int64)memstex.ullTotalPhys / 1024.0;
else if (global_memory_status (&memst))
totphys = memst.dwTotalPhys / 1024.0;
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#720
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> Date: Thu, 14 Aug 2008 12:57:56 -0400
> From: Francis Litterio <flitterio <at> gmail.com>
> Cc:
>
> When building CVS Emacs on Windows XP SP2 using Visual Studio 6.0, the
> following patch is needed to prevent the compiler from displaying an
> error about unsigned __int64 not being convertable to double.
Thank you for your report. Can you show the error text?
> - totphys = memstex.ullTotalPhys / 1024.0;
> + totphys = (signed __int64)memstex.ullTotalPhys / 1024.0;
Does it help to use 1024.0L here instead of just 1024.0?
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#720
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#720
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> When building CVS Emacs on Windows XP SP2 using Visual Studio 6.0, the
> following patch is needed to prevent the compiler from displaying an
> error about unsigned __int64 not being convertable to double.
Wouldn't it be better to cast to (double) ?
Stefan
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#720
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#720
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #30 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Thu, 14 Aug 2008 15:54:44 -0400
> Cc: bug-gnu-emacs <at> gnu.org, 720 <at> emacsbugs.donarmstrong.com
>
> > When building CVS Emacs on Windows XP SP2 using Visual Studio 6.0, the
> > following patch is needed to prevent the compiler from displaying an
> > error about unsigned __int64 not being convertable to double.
>
> Wouldn't it be better to cast to (double) ?
Wouldn't that be doing the same mistake? The compiler probably has a
point: an unsigned 64-bit number has more bits than a simple double
can handle.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#720
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#720
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Francis Litterio <flitterio <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #40 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Eli Zaretskii wrote:
>> From: Francis Litterio
>>
>> When building CVS Emacs on Windows XP SP2 using Visual Studio 6.0, the
>> following patch is needed to prevent the compiler from displaying an
>> error about unsigned __int64 not being convertable to double.
>
> Thank you for your report. Can you show the error text?
Sorry for omitting that. The error was:
w32.c(3820) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
>> - totphys = memstex.ullTotalPhys / 1024.0;
>> + totphys = (signed __int64)memstex.ullTotalPhys / 1024.0;
>
> Does it help to use 1024.0L here instead of just 1024.0?
Nope. Same error.
Else-thread, Stefan Monnier asked:
> Wouldn't it be better to cast to (double) ?
That doesn't help either. Each of these variations causes the same error:
totphys = (double)(memstex.ullTotalPhys / 1024.0);
totphys = memstex.ullTotalPhys / (double)1024.0;
totphys = (double)memstex.ullTotalPhys / 1024.0L;
totphys = (double)memstex.ullTotalPhys / (double)1024.0;
--
Fran
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#720
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Francis Litterio <flitterio <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
bug reassigned from package `emacs' to `emacs,w32'.
Request was from
Jason Rumney <jasonr <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Fri, 15 Aug 2008 00:50:03 GMT)
Full text and
rfc822 format available.
Tags added: patch
Request was from
Jason Rumney <jasonr <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Fri, 15 Aug 2008 00:50:03 GMT)
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
Message #54 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> Cc: 720 <at> emacsbugs.donarmstrong.com, bug-gnu-emacs <at> gnu.org,
> Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Thu, 14 Aug 2008 16:15:04 -0400
> From: Francis Litterio <flitterio <at> gmail.com>
>
> w32.c(3820) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
"Not implemented"? I'm not sure we want to support such a deficient
compiler. How about this:
DWORD tot_hi = memstex.ullTotalPhys >> 32;
DWORD tot_md = (memstex.ullTotalPhys & 0x00000000ffffffffLL) >> 10;
DWORD tot_lo = memstex.ullTotalPhys % 1024LL;
totphys = tot_hi * 4194304.0 + tot_md + tot_lo / 1024.0;
Does this work?
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
Francis Litterio <flitterio <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
Message #64 received at 720 <at> emacsbugs.donarmstrong.com (full text, mbox):
Eli Zaretskii wrote:
>> From: Francis Litterio
>>
>> w32.c(3820) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
>
> "Not implemented"? I'm not sure we want to support such a deficient
> compiler.
I would happily use a newer compiler. The file emacs/nt/INSTALL says
this:
To compile Emacs, you will need either Microsoft Visual C++ 2.0, or
later up to 7.0, and nmake
I didn't realize that I could use a version of VC++ newer than 6.0. I
would be happy to abandon 6.0 for building Emacs on Windows. Is VC++
7.0 the compiler that comes with Visual Studio 2003?
What compiler do the Emacs developers use to build on Windows?
> How about this:
>
> DWORD tot_hi = memstex.ullTotalPhys >> 32;
> DWORD tot_md = (memstex.ullTotalPhys & 0x00000000ffffffffLL) >> 10;
> DWORD tot_lo = memstex.ullTotalPhys % 1024LL;
> totphys = tot_hi * 4194304.0 + tot_md + tot_lo / 1024.0;
>
> Does this work?
Nope:
w32.c(3823) : error C2059: syntax error : 'bad suffix on number'
w32.c(3823) : error C2146: syntax error : missing ')' before identifier 'L'
w32.c(3823) : error C2059: syntax error : ')'
w32.c(3824) : error C2059: syntax error : 'bad suffix on number'
w32.c(3824) : error C2146: syntax error : missing ';' before identifier 'L'
w32.c(3824) : error C2065: 'L' : undeclared identifier
Here's the relevant code with line numbers:
3819 if (global_memory_status_ex (&memstex))
3820 #if 1
3821 {
3822 DWORD tot_hi = memstex.ullTotalPhys >> 32;
3823 DWORD tot_md = (memstex.ullTotalPhys & 0x00000000ffffffffLL) >> 10;
3824 DWORD tot_lo = memstex.ullTotalPhys % 1024LL;
3825 totphys = tot_hi * 4194304.0 + tot_md + tot_lo / 1024.0;
3826 }
3827 #else
3828 totphys = (signed __int64)memstex.ullTotalPhys / 1024.0;
3829 #endif
--
Fran
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
Message #69 received at 720 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Date: Fri, 15 Aug 2008 09:22:31 -0400
> From: Francis Litterio <flitterio <at> gmail.com>
>
> Eli Zaretskii wrote:
>
> >> From: Francis Litterio
> >>
> >> w32.c(3820) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
> >
> > "Not implemented"? I'm not sure we want to support such a deficient
> > compiler.
>
> I would happily use a newer compiler. The file emacs/nt/INSTALL says
> this:
>
> To compile Emacs, you will need either Microsoft Visual C++ 2.0, or
> later up to 7.0, and nmake
>
> I didn't realize that I could use a version of VC++ newer than 6.0. I
> would be happy to abandon 6.0 for building Emacs on Windows. Is VC++
> 7.0 the compiler that comes with Visual Studio 2003?
Yes.
> What compiler do the Emacs developers use to build on Windows?
The MinGW port of GCC.
> > How about this:
> >
> > DWORD tot_hi = memstex.ullTotalPhys >> 32;
> > DWORD tot_md = (memstex.ullTotalPhys & 0x00000000ffffffffLL) >> 10;
> > DWORD tot_lo = memstex.ullTotalPhys % 1024LL;
> > totphys = tot_hi * 4194304.0 + tot_md + tot_lo / 1024.0;
> >
> > Does this work?
>
> Nope:
>
> w32.c(3823) : error C2059: syntax error : 'bad suffix on number'
> w32.c(3823) : error C2146: syntax error : missing ')' before identifier 'L'
> w32.c(3823) : error C2059: syntax error : ')'
> w32.c(3824) : error C2059: syntax error : 'bad suffix on number'
> w32.c(3824) : error C2146: syntax error : missing ';' before identifier 'L'
> w32.c(3824) : error C2065: 'L' : undeclared identifier
Does it mean that the LL suffix is not supported in VS 6? Can you try
the same without the 2 LL suffixes?
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Fran Litterio" <flitterio <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
Message #74 received at 720 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Aug 15, 2008 at 12:15 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > > How about this:
> > >
> > > DWORD tot_hi = memstex.ullTotalPhys >> 32;
> > > DWORD tot_md = (memstex.ullTotalPhys & 0x00000000ffffffffLL) >> 10;
> > > DWORD tot_lo = memstex.ullTotalPhys % 1024LL;
> > > totphys = tot_hi * 4194304.0 + tot_md + tot_lo / 1024.0;
> > >
> > > Does this work?
> >
> > Nope:
> >
> > w32.c(3823) : error C2059: syntax error : 'bad suffix on number'
> > w32.c(3823) : error C2146: syntax error : missing ')' before identifier
> 'L'
> > w32.c(3823) : error C2059: syntax error : ')'
> > w32.c(3824) : error C2059: syntax error : 'bad suffix on number'
> > w32.c(3824) : error C2146: syntax error : missing ';' before identifier
> 'L'
> > w32.c(3824) : error C2065: 'L' : undeclared identifier
>
> Does it mean that the LL suffix is not supported in VS 6?
I think so.
> Can you try
> the same without the 2 LL suffixes?
>
Yes, omitting the LL suffixes compiles with VS 6, though with several of
these warnings:
warning C4244: '=' : conversion from 'long double ' to 'long ', possible
loss of data
--
Fran
[Message part 2 (text/html, inline)]
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
Message #79 received at 720 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Date: Fri, 15 Aug 2008 13:11:45 -0400
> From: "Fran Litterio" <flitterio <at> gmail.com>
> Cc: 720 <at> emacsbugs.donarmstrong.com
>
> > > w32.c(3823) : error C2059: syntax error : 'bad suffix on number'
> > > w32.c(3823) : error C2146: syntax error : missing ')' before identifier
> > 'L'
> > > w32.c(3823) : error C2059: syntax error : ')'
> > > w32.c(3824) : error C2059: syntax error : 'bad suffix on number'
> > > w32.c(3824) : error C2146: syntax error : missing ';' before identifier
> > 'L'
> > > w32.c(3824) : error C2065: 'L' : undeclared identifier
> >
> > Does it mean that the LL suffix is not supported in VS 6?
>
>
> I think so.
>
>
> > Can you try
> > the same without the 2 LL suffixes?
> >
>
> Yes, omitting the LL suffixes compiles with VS 6, though with several of
> these warnings:
>
> warning C4244: '=' : conversion from 'long double ' to 'long ', possible
> loss of data
Thanks, I installed the version without LL suffixes.
Reply sent to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Francis Litterio <flitterio <at> gmail.com>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #84 received at 720-done <at> emacsbugs.donarmstrong.com (full text, mbox):
This bug is fixed.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
Message #89 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
>> > When building CVS Emacs on Windows XP SP2 using Visual Studio 6.0, the
>> > following patch is needed to prevent the compiler from displaying an
>> > error about unsigned __int64 not being convertable to double.
>> Wouldn't it be better to cast to (double) ?
> Wouldn't that be doing the same mistake? The compiler probably has a
> point: an unsigned 64-bit number has more bits than a simple double
> can handle.
Yes, it's a good reason for not doing the conversion automatically, but
IIUC we need a double, so we don't have much of a choice, and that's
what the cast to (double) would tell the compiler.
Stefan
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
Message #94 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> "Not implemented"? I'm not sure we want to support such a deficient
> compiler.
Indeed we don't.
> How about this:
> DWORD tot_hi = memstex.ullTotalPhys >> 32;
> DWORD tot_md = (memstex.ullTotalPhys & 0x00000000ffffffffLL) >> 10;
> DWORD tot_lo = memstex.ullTotalPhys % 1024LL;
> totphys = tot_hi * 4194304.0 + tot_md + tot_lo / 1024.0;
> Does this work?
Please don't install such hideous code just to work around a deficiency
in an obsolete proprietary compiler. Especially since there's
a perfectly good Free alternative available.
Stefan
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
:
bug#720
; Package
emacs,w32
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com
.
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <don <at> donarmstrong.com>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Sat, 13 Sep 2008 14:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 342 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.