removing some dead "keep compiler quiet" code

Started by Peter Eisentrautover 13 years ago2 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Since ereport() can now communicate to the compiler whether it returns
or not, a fair amount of "keep compiler quiet" code is dead. Since the
method that ereport() uses is not dependent on any compiler-specific
attributes, I think this code can just be removed. I propose the
attached patch.

Attachments:

pg-keep-compiler-quiet.patchtext/x-patch; charset=UTF-8; name=pg-keep-compiler-quiet.patchDownload+1-143
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: removing some dead "keep compiler quiet" code

Peter Eisentraut <peter_e@gmx.net> writes:

Since ereport() can now communicate to the compiler whether it returns
or not, a fair amount of "keep compiler quiet" code is dead. Since the
method that ereport() uses is not dependent on any compiler-specific
attributes, I think this code can just be removed. I propose the
attached patch.

Meh. This will only work if the compiler understands that abort()
doesn't return --- compilers that don't know that will start bleating
about uninitialized variables again. And the ones that do know it
will be able to throw away the dead code anyway.

I doubt this is a good idea.

regards, tom lane