help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

warning: type of ‘error’ does not match original declaration


From: R. Diez
Subject: warning: type of ‘error’ does not match original declaration
Date: Mon, 9 Mar 2020 10:51:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

Hi all:

I am building GNU Make 4.3 with LTO, with the following commands:

mkdir /home/rdiez/rdiez/temp/make-4.3/make-4.3-obj
cd    /home/rdiez/rdiez/temp/make-4.3/make-4.3-obj
../make-4.3-src/configure CFLAGS="-g3 -O3 -march=native -flto" 
--prefix="/home/rdiez/rdiez/make-4.3-bin"
make --output-sync=recurse  -j "$(( $(getconf _NPROCESSORS_ONLN) + 1 ))"
make install-strip

I am getting the following warnings when compiling:

gcc -g3 -O3 -march=native -flto -Wl,--export-dynamic -o make src/ar.o src/arscan.o src/commands.o src/default.o src/dir.o src/expand.o src/file.o src/function.o src/getopt.o src/getopt1.o src/guile.o src/hash.o src/implicit.o src/job.o src/load.o src/loadapi.o src/main.o src/misc.o src/output.o src/read.o src/remake.o src/rule.o src/signame.o src/strcache.o src/variable.o src/version.o src/vpath.o src/posixos.o src/remote-stub.o lib/libgnu.a -ldl

../../make-4.3-src/lib/error.h:52:13: warning: type of ‘error’ does not match 
original declaration [-Wlto-type-mismatch]
../make-4.3-src/src/output.c:590:1: note: type mismatch in parameter 1
 error (const floc *flocp, size_t len, const char *fmt, ...)
 ^
../make-4.3-src/src/output.c:590:1: note: ‘error’ was previously declared here
../make-4.3-src/src/output.c:590:1: note: code may be misoptimized unless 
-fno-strict-aliasing is used

This is the declaration in error.h:

extern void error (int __status, int __errnum, const char *__format, ...)
     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4));

And this is the one in output.c:

void
error (const floc *flocp, size_t len, const char *fmt, ...)

I think one of those "error" functions should be renamed, or declared static, 
or whatever.

Best regards,
  rdiez



reply via email to

[Prev in Thread] Current Thread [Next in Thread]