pgsql: Teach compiler that ereport(>=ERROR) does not return - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Teach compiler that ereport(>=ERROR) does not return
Date
Msg-id E1T3fj3-0002Ag-8e@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Teach compiler that ereport(>=ERROR) does not return

When elevel >= ERROR, we add an abort() call to the ereport() macro to
give the compiler a hint that the ereport() expansion will not return,
but the abort() isn't actually reached because the longjmp happens in
errfinish().

Because the effect of ereport() varies with the elevel, we cannot use
standard compiler attributes such as noreturn for this.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/71450d7fd6c7cf7b3e38ac56e363bff6a681973c

Modified Files
--------------
src/include/utils/elog.h |    7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Remove external PID file on postmaster exit
Next
From: Robert Haas
Date:
Subject: pgsql: Add a note to the MVCC chapter that some things aren't transacti