Re: Win64 warnings about size_t

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Win64 warnings about size_t
Date: 2010-01-01 19:50:01
Message-ID: 9837222c1001011150m4c9932a7n550124e6ff5c2f15@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 1, 2010 at 20:33, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> On Fri, Jan 1, 2010 at 20:12, Peter Eisentraut <peter_e(at)gmx(dot)net> 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.
>
> ... and would break things on many many other platforms.

That's what I was afraid of.

> Use "(Size) 1" instead of "1" if you really want to suppress this.

That fixes it as well. Will apply a patch to that effect.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2010-01-01 19:54:16 Re: IntArray in c.h
Previous Message Magnus Hagander 2010-01-01 19:45:44 Re: [PATCH] Windows x64 [repost]