Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: C├ędric VillemainDate: 2012-06-30 11:06:10
Subject: Re: Pruning the TODO list
Previous:From: Thomas MunroDate: 2012-06-30 10:12:09
Subject: Re: Covering Indexes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group