Re: Refactor compile-time assertion checks for C/C++ - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Refactor compile-time assertion checks for C/C++
Date
Msg-id 20200311074623.GD3099@paquier.xyz
Whole thread Raw
In response to Re: Refactor compile-time assertion checks for C/C++  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Refactor compile-time assertion checks for C/C++  (Georgios Kokolatos <gkokolatos@pm.me>)
List pgsql-hackers
On Sat, Mar 07, 2020 at 04:44:48PM -0500, Tom Lane wrote:
> cfbot reports this doesn't work with MSVC.  Not sure why --- maybe
> it defines __cpp_static_assert differently than you're expecting?

I don't think that's the issue.  The CF bot uses MSVC 12.0 which
refers to the 2013.  __cpp_static_assert being introduced in MSVC
2017, this error is visibly telling us that this environment does not
like the C++ fallback implementation, which is actually what my
previous version of the patch was using (I can reproduce the error
with my MSVC 2015 VM as well).  I think that this points to an error
in the patch: for the refactoring, the fallback implementation of C
and C++ should use the fallback implementation for C that we have
currently on HEAD.

With the updated patch attached, the error goes away for me.  Let's
see what Mr. Robot thinks.  The patch was marked as ready for
committer, I am switching it back to "Needs review".
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Some problems of recovery conflict wait events
Next
From: Prabhat Sahu
Date:
Subject: Re: [Proposal] Global temporary tables