Re: elog/ereport noreturn decoration
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-06-30T14:52:29Z
Lists: pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes: > 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. Well, the Solaris Studio compiler produces "warning: statement not reached" messages, as seen for example on buildfarm member castoroides. I don't have one available to experiment with, so I'm not sure whether it knows that abort() doesn't return; but I think it rather foolish to assume that such a combination doesn't exist in the wild. regards, tom lane