-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Treat implicit function declarations in C as errors
Building with CFLAGS="-std=c11" using GCC exposed that certain function extensions to the C standard could have their pointer return values truncated. E.g. the POSIX strdup extension was unknown to gcc when using "-std=c11". GCC assumed it would be a function that returned an "int". That would then fail if the string pointer required > 32 bits. C99 removed support for implicit functions declarations. Some compilers, e.g. like gcc, will only warn about it. Clang has changed it to an error in version 16. strdup for example has been added to C23. Workaround for #77
- Loading branch information
1 parent
fe923a9
commit 855f8c1
Showing
3 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters