Commit 44e89ba
H. Peter Anvin (Intel)
compiler.h: drop the stupid C++-style cast-to-bool hack
The C++-style cast-to-bool hack was broken in concept that it doesn't help the
fundamental problem -- implicit conversions are broken for the
backwards compatibility enum definition -- as well as in
implementation, as it misspelled __STDC_VERSION__ as __STDC_VERSION.
The #ifdef bool test *should* have prevented this problem, but
apparently several compilers do define "bool" in <stdbool.h> even when
it is a keyword, in violation of the C23 spec.
Signed-off-by: H. Peter Anvin (Intel) <[email protected]>1 parent 587ed5e commit 44e89ba
1 file changed
+7
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | 184 | | |
| 185 | + | |
186 | 186 | | |
187 | | - | |
188 | | - | |
189 | 187 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | 188 | | |
198 | 189 | | |
199 | 190 | | |
200 | 191 | | |
201 | 192 | | |
202 | 193 | | |
203 | 194 | | |
204 | | - | |
| 195 | + | |
| 196 | + | |
205 | 197 | | |
206 | 198 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | 199 | | |
213 | 200 | | |
214 | 201 | | |
| |||
321 | 308 | | |
322 | 309 | | |
323 | 310 | | |
324 | | - | |
325 | | - | |
| 311 | + | |
| 312 | + | |
326 | 313 | | |
327 | | - | |
328 | | - | |
| 314 | + | |
| 315 | + | |
329 | 316 | | |
330 | 317 | | |
331 | 318 | | |
| |||
0 commit comments