From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: some dead code in functioncmds.c |
Date: | 2009-10-31 13:47:05 |
Message-ID: | 1256996825.28195.18.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On fre, 2009-10-30 at 19:08 +0100, Pavel Stehule wrote:
> 2009/10/30 Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>:
> > Pavel Stehule wrote:
> >> 2009/10/30 Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>:
> >>> To keep the compiler quiet about using the variables uninitialized. The
> >>> compiler doesn't know that ereport(ERROR) never returns.
> >>
> >> Should be similar code little bit commented?
> >
> > *shrug*, maybe, often we do put a "/* keep compiler quiet */" comment on
> > such places.
> >
> > On closer look, the "Alternative possibility: default to RETURNS VOID"
> > comment suggests that besides keeping the compiler quiet, those lines
> > demonstrate an alternative behavior that was considered.
>
> I prefere "keep compiler quiet". It is cleaner - and it is used more times.
A while ago a patch was discussed (in the "clang checker" threat) that
would teach the compiler that elog(>=ERROR) does not return, but I think
it's not portable without further work.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2009-10-31 13:59:27 | Re: Patch set under development to add usage reporting. |
Previous Message | John Murtari | 2009-10-31 12:38:45 | Re: Patch set under development to add usage reporting. |