A standard C library may not exist for cross-compile environments, thus the existence of <stdio.h> cannot be guaranteed. Use <stddef.h> instead, this header contains compiler-specific defines thus it usually comes from the compiler.pull/11343/head
parent
306efbd5b7
commit
3c47216fe9
3 changed files with 31 additions and 5 deletions
@ -0,0 +1,13 @@ |
|||||||
|
## Clarify of implicitly-included headers in C-like compiler checks |
||||||
|
|
||||||
|
Compiler check methods `compiler.compute_int()`, `compiler.alignment()` |
||||||
|
and `compiler.sizeof()` now have their implicitly-included headers |
||||||
|
corrected and documented. |
||||||
|
|
||||||
|
`<stdio.h>` was included unintentionally when cross-compiling, which |
||||||
|
is less than ideal because there is no guarantee that a standard library |
||||||
|
is available for the target platform. Only `<stddef.h>` is included instead. |
||||||
|
|
||||||
|
For projects that depend on the old behavior, the compiler check methods |
||||||
|
have an optional argument `prefix`, which can be used to specify additional |
||||||
|
`#include` directives. |
Loading…
Reference in new issue