From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Win64 warnings about size_t |
Date: | 2010-01-01 17:50:31 |
Message-ID: | 9837222c1001010950v592c046dh5bd61bd1262d15a1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 1, 2010 at 18:47, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> 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
> pointless anyway --- we have limitations in palloc and Datum
> representation that ensure we'll never be dealing with strings (or other
> values) larger than 1GB.
Ok.
>> strlen() returns size_t, which AFAICS is per the standard and not even
>> a Microsoft-specific idea.
>
> Correct.
>
>> So I don't really see what win64 does differently in this case, but
>> perhaps I've been looking at this code too long? Or is it simply that
>> MSVC warns about this and GCC doesn't, and I shuld disbale the
>> warning?
>
> 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/6kck0s93(VS.80).aspx this
warning is only about size_t, and not about the issue in general, so I
can just disable C4267 and they should go away.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-01-01 17:59:57 | Re: Win64 warnings about size_t |
Previous Message | Tom Lane | 2010-01-01 17:47:49 | Re: Win64 warnings about size_t |