Re: BUG #13788: compile error in generic_msvc.h - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13788: compile error in generic_msvc.h
Date
Msg-id 5176.1449005701@sss.pgh.pa.us
Whole thread Raw
In response to BUG #13788: compile error in generic_msvc.h  (paul.moore@centrify.com)
Responses Re: BUG #13788: compile error in generic_msvc.h  (Paul Moore <paul.moore@centrify.com>)
List pgsql-bugs
paul.moore@centrify.com writes:
> Bug reference:      13788
> Logged by:          paul moore
> Email address:      paul.moore@centrify.com
> PostgreSQL version: 9.5beta1
> Operating system:   win server 2012
> Description:

> vs 2015, compiling spi execq sample

> vc complains about this

> 1>c:\Program
> Files\PostgreSQL\9.5\include\server\port/atomics/generic-msvc.h(91): error
> C2664: 'LONG64 _InterlockedCompareExchange64(volatile LONG64
> *,LONG64,LONG64)': cannot convert argument 1 from 'volatile uint64 *' to
> 'volatile LONG64 *'

> same for the add64 function a few lines later

That's a bit weird.  A perhaps plausible explanation would be that the
compiler is unhappy about passing an unsigned argument to a signed
parameter; but if they've tightened it up like that, why no similar
complaint for the 32-bit versions just above these?

Can you try inserting a cast to (volatile int64 *), just to see?

            regards, tom lane

pgsql-bugs by date:

Previous
From: paul.moore@centrify.com
Date:
Subject: BUG #13788: compile error in generic_msvc.h
Next
From: Michael Paquier
Date:
Subject: Re: PQexec() hangs on OOM