From 8e579083b1142dab26f268d77650e680cad6b4b5 Mon Sep 17 00:00:00 2001 From: Cody Tapscott <84105208+topolarity@users.noreply.github.com> Date: Thu, 4 Apr 2024 16:58:47 -0400 Subject: [PATCH] Make implicit function definition (in `julia_init.c`) an error (#936) This is an easy thing to get wrong. Someone more familiar with Julia than with C is not likely to recognize the significance of this error. I've also almost never seen this intentionally ignored in the wild, so I don't expect many false positives. --- src/juliaconfig.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/juliaconfig.jl b/src/juliaconfig.jl index 4424596e..ab237872 100644 --- a/src/juliaconfig.jl +++ b/src/juliaconfig.jl @@ -54,7 +54,8 @@ end function cflags() flags = IOBuffer() - print(flags, "-O2 -std=gnu99") + print(flags, " -Werror-implicit-function-declaration") + print(flags, " -O2 -std=gnu99") include = shell_escape(julia_includedir()) print(flags, " -I", include) if Sys.isunix()