- Notifications
You must be signed in to change notification settings - Fork5
Commit43ef6ab
committed
Improve unreachability recognition in elog() macro.
Some experimentation with an older version of gcc showed that it is ableto determine whether "if (elevel_ >= ERROR)" is compile-time constantif elevel_ is declared "const", but otherwise not so much. We hadaccounted for that in ereport() but were too miserly with braces tomake it so in elog(). I don't know how many currently-interestingcompilers have the same quirk, but in case it will save some codespace, let's make sure that elog() is on the same footing as ereport()for this purpose.Back-patch to 9.3 where we introduced pg_unreachable() calls intoelog/ereport.1 parentbca6eeb commit43ef6ab
1 file changed
+6
-5
lines changedLines changed: 6 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
219 |
| - | |
220 | 219 |
| |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
225 | 226 |
| |
226 | 227 |
| |
227 | 228 |
| |
|
0 commit comments
Comments
(0)