Re: VS 2015 support in src/tools/msvc - Mailing list pgsql-hackers

From Tom Lane
Subject Re: VS 2015 support in src/tools/msvc
Date
Msg-id 4034.1461299456@sss.pgh.pa.us
Whole thread Raw
In response to Re: VS 2015 support in src/tools/msvc  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: VS 2015 support in src/tools/msvc  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 04/21/2016 05:15 PM, Tom Lane wrote:
>> Do the other contrib modules all pass?  I can't recall if seg was the
>> only one we'd left like this.

> Only seg fails.

As a crosscheck, I put some code into fmgr_c_validator() to log a message
when creating a V0 function with a pass-by-val return type.  (Pass-by-ref
is no problem, according to my hypothesis, since it necessarily means
the C function returns a pointer.)  I get these hits in core + contrib
regression tests:

core:
LOG:  version-0 function widget_in returns type widget
LOG:  version-0 function oldstyle_length returns type integer

contrib:
LOG:  version-0 function seg_over_left returns type boolean
LOG:  version-0 function seg_over_right returns type boolean
LOG:  version-0 function seg_left returns type boolean
LOG:  version-0 function seg_right returns type boolean
LOG:  version-0 function seg_lt returns type boolean
LOG:  version-0 function seg_le returns type boolean
LOG:  version-0 function seg_gt returns type boolean
LOG:  version-0 function seg_ge returns type boolean
LOG:  version-0 function seg_contains returns type boolean
LOG:  version-0 function seg_contained returns type boolean
LOG:  version-0 function seg_overlap returns type boolean
LOG:  version-0 function seg_same returns type boolean
LOG:  version-0 function seg_different returns type boolean
LOG:  version-0 function seg_cmp returns type integer
LOG:  version-0 function gseg_consistent returns type boolean
LOG:  version-0 function gseg_compress returns type internal
LOG:  version-0 function gseg_decompress returns type internal
LOG:  version-0 function gseg_penalty returns type internal
LOG:  version-0 function gseg_picksplit returns type internal
LOG:  version-0 function gseg_same returns type internal

The widget_in gripe is a false positive, caused by the fact that we don't
know the properties of type widget when widget_in is declared.  We also
need not worry about the functions that return "internal", since that's
defined to be pointer-sized.

If we assume that oldstyle functions returning integer are still okay,
which the success of the regression test case involving oldstyle_length()
seems to prove, then indeed seg's bool-returning functions are the only
hazard.

Note though that this test fails to cover any contrib modules that
lack regression tests, since they wouldn't have gotten loaded by
"make installcheck".
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: VS 2015 support in src/tools/msvc
Next
From: Andres Freund
Date:
Subject: Re: kqueue