Re: [HACKERS] Win64 warnings about size_t

2010-01-02 Thread Bruce Momjian
Magnus Hagander wrote: > On Sat, Jan 2, 2010 at 03:13, Bruce Momjian wrote: > > Magnus Hagander wrote: > >> I have adapted the win64 patches a bit, and now have a working build. > >> As in it runs the regression tests fine. However, I have well over a > >> thousand warnings of the type: > >> conve

Re: [HACKERS] Win64 warnings about size_t

2010-01-02 Thread Magnus Hagander
On Sat, Jan 2, 2010 at 03:13, Bruce Momjian wrote: > Magnus Hagander wrote: >> I have adapted the win64 patches a bit, and now have a working build. >> As in it runs the regression tests fine. However, I have well over a >> thousand warnings of the type: >> conversion from 'size_t' to 'int', possi

Re: [HACKERS] Win64 warnings about size_t

2010-01-01 Thread Bruce Momjian
Magnus Hagander wrote: > I have adapted the win64 patches a bit, and now have a working build. > As in it runs the regression tests fine. However, I have well over a > thousand warnings of the type: > conversion from 'size_t' to 'int', possible loss of data > > My first 5-6 checks of where these h

Re: [HACKERS] Win64 warnings about size_t

2010-01-01 Thread Magnus Hagander
On Fri, Jan 1, 2010 at 20:33, Tom Lane wrote: > Magnus Hagander writes: >> On Fri, Jan 1, 2010 at 20:12, Peter Eisentraut wrote: >>> This shouldn't be a problem for the same reason that casting size_t to >>> int is not a problem in the PostgreSQL backend code, but perhaps writing >>> 1L << ... w

Re: [HACKERS] Win64 warnings about size_t

2010-01-01 Thread Tom Lane
Magnus Hagander writes: > On Fri, Jan 1, 2010 at 20:12, Peter Eisentraut wrote: >> This shouldn't be a problem for the same reason that casting size_t to >> int is not a problem in the PostgreSQL backend code, but perhaps writing >> 1L << ... would fix it. > 1L didn't fix it. 1LL did, however.

Re: [HACKERS] Win64 warnings about size_t

2010-01-01 Thread Magnus Hagander
On Fri, Jan 1, 2010 at 20:12, Peter Eisentraut wrote: > On fre, 2010-01-01 at 20:01 +0100, Magnus Hagander wrote: >>   .\src\backend\utils\mmgr\aset.c(701): warning C4334: '<<' : result >> of 32-bit shift implicitly converted to 64 bits (was 64-bit shift >> intended?) >>   .\src\backend\utils\mmgr

Re: [HACKERS] Win64 warnings about size_t

2010-01-01 Thread Peter Eisentraut
On fre, 2010-01-01 at 20:01 +0100, Magnus Hagander wrote: > .\src\backend\utils\mmgr\aset.c(701): warning C4334: '<<' : result > of 32-bit shift implicitly converted to 64 bits (was 64-bit shift > intended?) > .\src\backend\utils\mmgr\aset.c(705): warning C4334: '<<' : result > of 32-bit shift

Re: [HACKERS] Win64 warnings about size_t

2010-01-01 Thread Magnus Hagander
On Fri, Jan 1, 2010 at 18:59, Tom Lane wrote: > Magnus Hagander writes: >> On Fri, Jan 1, 2010 at 18:47, Tom Lane wrote: >>> I think MSVC is just complaining about something gcc doesn't.  If you >>> can disable this specific warning it'd be a good plan. > >> Yeah, that should be doable. Accordin

Re: [HACKERS] Win64 warnings about size_t

2010-01-01 Thread Tom Lane
Magnus Hagander writes: > On Fri, Jan 1, 2010 at 18:47, Tom Lane wrote: >> I think MSVC is just complaining about something gcc doesn't.  If you >> can disable this specific warning it'd be a good plan. > Yeah, that should be doable. According to > http://msdn.microsoft.com/en-us/library/6kck0s9

Re: [HACKERS] Win64 warnings about size_t

2010-01-01 Thread Magnus Hagander
On Fri, Jan 1, 2010 at 18:47, Tom Lane wrote: > Magnus Hagander writes: >> My first 5-6 checks of where these happen are all cases where we >> assign the result of strlen() something to an int, or call a function >> taking an int as parameter with the result of strlen() in there. > > Yeah.  Getti

Re: [HACKERS] Win64 warnings about size_t

2010-01-01 Thread Tom Lane
Magnus Hagander writes: > My first 5-6 checks of where these happen are all cases where we > assign the result of strlen() something to an int, or call a function > taking an int as parameter with the result of strlen() in there. Yeah. Getting rid of all those cases is impractical I think, and p

[HACKERS] Win64 warnings about size_t

2010-01-01 Thread Magnus Hagander
I have adapted the win64 patches a bit, and now have a working build. As in it runs the regression tests fine. However, I have well over a thousand warnings of the type: conversion from 'size_t' to 'int', possible loss of data My first 5-6 checks of where these happen are all cases where we assign