From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Win64 warnings about size_t |
Date: | 2010-01-01 19:28:13 |
Message-ID: | 9837222c1001011128p6b567979g1c213dee4ac33e4@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 1, 2010 at 20:12, Peter Eisentraut <peter_e(at)gmx(dot)net> 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\aset.c(705): warning C4334: '<<' : result
>> of 32-bit shift implicitly converted to 64 bits (was 64-bit shift
>> intended?)
>>
>> Perhaps we need some casting there?
>
> 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.
ISTM that this is a warning we don't want to disable, so assuming that
should be safe on other platforms (it passes on my 32-bit linux
without warnings or anything), I'd vote for putting it in there.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-01-01 19:33:07 | Re: Win64 warnings about size_t |
Previous Message | Magnus Hagander | 2010-01-01 19:25:21 | win32 socket definition |