From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: cleanup in code |
Date: | 2014-01-07 19:55:44 |
Message-ID: | 52CC5BC0.8010502@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01/07/2014 05:20 PM, Tom Lane wrote:
> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
>> I think it will be like Andres said up thread, to stop multiple evaluations
>> of the expression passed to the macro.
>
> Exactly. We are not going to risk multiple evals in a macro as commonly
> used as elog/ereport; the risk/benefit ratio is just too high.
>
> I don't see anything wrong with suppressing this warning by inserting
> an additional return statement. The code is already plastered with such
> things, from the days before we had any unreachability hints in
> elog/ereport. And as I said upthread, there is no good reason to suppose
> that the unreachability hints are always recognized by every compiler.
> I take this behavior of MSVC as proof of that statement.
Yeah, I was just surprised because I thought MSVC understood it.
Committed the additional return statement.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Gabriele Bartolini | 2014-01-07 20:17:54 | Re: [PATCH] Support for pg_stat_archiver view |
Previous Message | Kevin Grittner | 2014-01-07 19:47:39 | Re: Re: How to reproduce serialization failure for a read only transaction. |