- Notifications
You must be signed in to change notification settings - Fork28
Commitf2717c7
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 parentddc8893 commitf2717c7
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | 209 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
0 commit comments
Comments
(0)