Re: logical changeset generation v6.8 - Mailing list pgsql-hackers

From David Rowley
Subject Re: logical changeset generation v6.8
Date
Msg-id CAApHDvqOsb4nc3OG0xoBoJ2fmA-6AkihuWsAd43RLekqk6SmCQ@mail.gmail.com
Whole thread Raw
In response to Re: logical changeset generation v6.8  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Sat, Dec 14, 2013 at 12:12 AM, Andres Freund <andres@2ndquadrant.com> wrote:
On 2013-12-13 20:58:24 +1300, David Rowley wrote:
> On Wed, Dec 11, 2013 at 1:11 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> This introduced a new compiler warning on the visual studios build:
>   d:\postgres\b\src\backend\utils\cache\relcache.c(3958): warning C4715:
> 'RelationGetIndexAttrBitmap' : not all control paths return a value
> [D:\Postgres\b\postgres.vcxproj]
>
> The attached patch fixes it.

I thought we'd managed to get elog(ERROR) properly annotated as noreturn
on msvc as well?


It looks like this is down to the elog macro, where the elevel is being assigned to a variable elevel_ then we're only doing pg_unreachable(); if elevel_ >= ERROR. The compiler must not be confident enough to optimise out the if condition even though the elevel is not changed after it is set from the constant.

Regards

David Rowley
 
Greetings,

Andres Freund

--
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Changeset Extraction Interfaces
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: patch: make_timestamp function