Re: Refactor compile-time assertion checks for C/C++

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Refactor compile-time assertion checks for C/C++
Date: 2020-03-11 07:46:43
Message-ID: 20200311074623.GD3099@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
v2-0001-Refactor-assertion-definitions-in-c.h.patch text/x-diff 2.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Prabhat Sahu 2020-03-11 07:52:03 Re: [Proposal] Global temporary tables
Previous Message Fujii Masao 2020-03-11 07:41:58 Re: Some problems of recovery conflict wait events