forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6d7dc53
committed
Return implementation defined value if pg_$op_s$bit_overflow overflows.
Some older compilers otherwise sometimes complain about undefinedvalues, even though the return value should not be used in theoverflow case. We assume that any decent compiler will optimize awaythe unnecessary assignment in performance critical cases.We do not want to restrain the returned value to a specific value,e.g. 0 or the wrapped-around value, because some fast ways toimplement overflow detecting math do not easily allow forthat (e.g. msvc intrinsics). As the function documentation alreadydocuments the returned value in case of intrinsics to beimplementation defined, no documentation has to be updated.Per complaint from Tom Lane and his buildfarm member prairiedog.Author: Andres FreundDiscussion:https://postgr.es/m/18169.1513958454@sss.pgh.pa.us1 parent9a725f7 commit6d7dc53
1 file changed
+34
-0
lines changedLines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| 37 | + | |
| 38 | + | |
37 | 39 |
| |
| 40 | + | |
38 | 41 |
| |
39 | 42 |
| |
40 | 43 |
| |
| |||
54 | 57 |
| |
55 | 58 |
| |
56 | 59 |
| |
| 60 | + | |
| 61 | + | |
57 | 62 |
| |
| 63 | + | |
58 | 64 |
| |
59 | 65 |
| |
60 | 66 |
| |
| |||
74 | 80 |
| |
75 | 81 |
| |
76 | 82 |
| |
| 83 | + | |
| 84 | + | |
77 | 85 |
| |
| 86 | + | |
78 | 87 |
| |
79 | 88 |
| |
80 | 89 |
| |
| |||
94 | 103 |
| |
95 | 104 |
| |
96 | 105 |
| |
| 106 | + | |
| 107 | + | |
97 | 108 |
| |
| 109 | + | |
98 | 110 |
| |
99 | 111 |
| |
100 | 112 |
| |
| |||
114 | 126 |
| |
115 | 127 |
| |
116 | 128 |
| |
| 129 | + | |
| 130 | + | |
117 | 131 |
| |
| 132 | + | |
118 | 133 |
| |
119 | 134 |
| |
120 | 135 |
| |
| |||
134 | 149 |
| |
135 | 150 |
| |
136 | 151 |
| |
| 152 | + | |
| 153 | + | |
137 | 154 |
| |
| 155 | + | |
138 | 156 |
| |
139 | 157 |
| |
140 | 158 |
| |
| |||
154 | 172 |
| |
155 | 173 |
| |
156 | 174 |
| |
| 175 | + | |
| 176 | + | |
157 | 177 |
| |
| 178 | + | |
158 | 179 |
| |
159 | 180 |
| |
160 | 181 |
| |
161 | 182 |
| |
162 | 183 |
| |
| 184 | + | |
| 185 | + | |
163 | 186 |
| |
| 187 | + | |
164 | 188 |
| |
165 | 189 |
| |
166 | 190 |
| |
| |||
180 | 204 |
| |
181 | 205 |
| |
182 | 206 |
| |
| 207 | + | |
| 208 | + | |
183 | 209 |
| |
| 210 | + | |
184 | 211 |
| |
185 | 212 |
| |
186 | 213 |
| |
187 | 214 |
| |
188 | 215 |
| |
| 216 | + | |
| 217 | + | |
189 | 218 |
| |
| 219 | + | |
190 | 220 |
| |
191 | 221 |
| |
192 | 222 |
| |
| |||
206 | 236 |
| |
207 | 237 |
| |
208 | 238 |
| |
| 239 | + | |
| 240 | + | |
209 | 241 |
| |
| 242 | + | |
210 | 243 |
| |
211 | 244 |
| |
212 | 245 |
| |
| |||
229 | 262 |
| |
230 | 263 |
| |
231 | 264 |
| |
| 265 | + | |
232 | 266 |
| |
233 | 267 |
| |
234 | 268 |
| |
|
0 commit comments
Comments
(0)