Re: Support pg_attribute_aligned and noreturn in MSVC

From: James Coleman <jtc331(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support pg_attribute_aligned and noreturn in MSVC
Date: 2022-09-20 12:01:20
Message-ID: CAAaqYe_myaig5A76ZRV_0ky7bF=7nwBAa23Vn_8SQZy1bL10Ag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 19, 2022 at 11:21 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Mon, Sep 19, 2022 at 08:51:37PM -0400, James Coleman wrote:
> > Yes, fixed.
>
> The CF bot is failing compilation on Windows:
> http://commitfest.cputube.org/james-coleman.html
> https://api.cirrus-ci.com/v1/task/5376566577332224/logs/build.log
>
> There is something going on with noreturn() after applying it to
> elog.h:
> 01:11:00.468] c:\cirrus\src\include\utils\elog.h(410,45): error C2085:
> 'ThrowErrorData': not in formal parameter list (compiling source file
> src/common/hashfn.c) [c:\cirrus\libpgcommon.vcxproj]
> [01:11:00.468] c:\cirrus\src\include\mb\pg_wchar.h(701,80): error
> C2085: 'pgwin32_message_to_UTF16': not in formal parameter list
> (compiling source file src/common/encnames.c)
> [c:\cirrus\libpgcommon.vcxproj]
> [01:11:00.468] c:\cirrus\src\include\utils\elog.h(411,54): error
> C2085: 'pg_re_throw': not in formal parameter list (compiling source
> file src/common/hashfn.c) [c:\cirrus\libpgcommon.vcxproj]
>
> align() seems to look fine, at least. I'd be tempted to apply the
> align part first, as that's independently useful for itemptr.h.

I don't have access to a Windows machine for testing, but re-reading
the documentation it looks like the issue is that our noreturn macro
is used after the definition while the MSVC equivalent is used before.
I've removed that for now (and commented about it); it's not as
valuable anyway since it's mostly an indicator for code analysis
(human and machine).

James Coleman

Attachment Content-Type Size
v3-0001-Support-pg_attribute_aligned-in-MSVC.patch application/octet-stream 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-09-20 12:08:04 Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures
Previous Message Amit Kapila 2022-09-20 12:00:58 Re: why can't a table be part of the same publication as its schema