Re: elog/ereport noreturn decoration - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: elog/ereport noreturn decoration
Date
Msg-id 1341053044.18033.2.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: elog/ereport noreturn decoration  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: elog/ereport noreturn decoration  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On fre, 2012-06-29 at 17:35 -0400, Tom Lane wrote:
> Yes.  The problem with trying to change that is that it's damned if
> you do and damned if you don't: compilers that are aware that abort()
> doesn't return will complain about unreachable code if we keep those
> extra variable initializations, while those that are not so aware will
> complain about uninitialized variables if we don't.

But my point was, there aren't any unused code warnings.  None of the
commonly used compilers issue any.  I'd be interested to know if there
is any recent C compiler supported by PostgreSQL that issues some kind
of unused code warning under any circumstances, and see an example of
that.  Then we can determine whether there is an issue here.



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Covering Indexes
Next
From: Cédric Villemain
Date:
Subject: Re: Pruning the TODO list