On Sat, Dec 14, 2013 at 12:12 AM, Andres Freund <and...@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 <robertmh...@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 >