forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0db3c55
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 parentdfe7121 commit0db3c55
1 file changed
+6
-5
lines changedLines changed: 6 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
250 | 250 |
| |
251 | 251 |
| |
252 | 252 |
| |
253 |
| - | |
254 | 253 |
| |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
259 | 260 |
| |
260 | 261 |
| |
261 | 262 |
| |
|
0 commit comments
Comments
(0)