[PATCH] Turn implict-function-declaration warnings into errors

Stefan Liebler stli@linux.vnet.ibm.com
Fri Sep 12 08:28:00 GMT 2014


Hi,

turning implicit-function-declaration warnings into errors leads to 
build failure on 31bit s390 due to several usages of macro udiv_qrnnd 
declared in file stdlib/longlong.h, e.g.:
"gcc elf-init.c ...

../sysdeps/wordsize-32/divdi3.c: In function '__udivmoddi4':
../sysdeps/wordsize-32/divdi3.c:82:4: error: implicit declaration of 
function '__udiv_w_sdiv' [-Werror=implicit-function-declaration]
     udiv_qrnnd (q0, n0, n1, n0, d0);
     ^
"

Andreas Krebbel had proposed a patch for fixing the warning/error on 
glibc-list (https://sourceware.org/ml/libc-alpha/2014-01/msg00280.html), 
which was then forwarded to gcc-list 
(https://gcc.gnu.org/ml/gcc-patches/2014-02/msg00194.html), but without 
any response.
I will ping on the gcc list. The stdlib/longlong.h file in glibc needs 
to be updated from gcc source after commit in gcc.

Bye
Stefan

On 09/08/2014 02:17 PM, Florian Weimer wrote:
> GCC 4.4, the minimum compiler version, supports this option.  Unlike
> other warnings, -Wimplicit-function-declaration warnings should be
> independent of compiler versions, so this change should not cause
> compiler-specific build failures (the usual trouble with -Werror).
>
> Testing this change revealed one missing #include file in a test case.
>



More information about the Libc-alpha mailing list