Re: elog/ereport noreturn decoration

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elog/ereport noreturn decoration
Date: 2012-06-30 10:44:04
Message-ID: 1341053044.18033.2.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cédric Villemain 2012-06-30 11:06:10 Re: Pruning the TODO list
Previous Message Thomas Munro 2012-06-30 10:12:09 Re: Covering Indexes