This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New build warning: implicit declaration of function âasprintfâ when building lto-plugin.o
- From: Mikhail Maltsev <maltsevm at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Cc: Andrew MacLeod <amacleod at redhat dot com>
- Date: Tue, 30 Jun 2015 04:57:34 +0300
- Subject: Re: New build warning: implicit declaration of function âasprintfâ when building lto-plugin.o
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4Y9z-bZGFPE1y2p_GvYXfdWjjK8E045ztnpndsZYHLj3w at mail dot gmail dot com>
On 29.06.2015 14:24, Uros Bizjak wrote:
> Hello!
>
> Recent commit introduced following build warning:
>
> /home/uros/gcc-svn/trunk/lto-plugin/lto-plugin.c: In function
> âclaim_file_handlerâ:
> /home/uros/gcc-svn/trunk/lto-plugin/lto-plugin.c:930:16: warning:
> implicit declaration of function âasprintfâ
> [-Wimplicit-function-declaration]
> t = hi ? asprintf (&objname, "%s@0x%x%08x", file->name, lo, hi)
Are you sure that it is recent? It started appearing in my builds since
r223590 (about a month ago), the previous build was r223502 (it did not
contain this warning). Also, there is another warning in libiberty
(started in the same commit):
/home/jenkins/workspace/build-gcc-trunk/src/libiberty/getruntime.c: In
function 'get_run_time':
/home/jenkins/workspace/build-gcc-trunk/src/libiberty/getruntime.c:98:14: warning:
enum conversion when passing argument 1 of 'getrusage' is invalid in C++
[-Wc++-compat]
getrusage (0, &rusage);
^
In file included from
/home/jenkins/workspace/build-gcc-trunk/src/libiberty/getruntime.c:47:0:
/usr/include/x86_64-linux-gnu/sys/resource.h:88:12: note: expected
'__rusage_who_t {aka enum __rusage_who}' but argument is of type 'int'
extern int getrusage (__rusage_who_t __who, struct rusage *__usage)
__THROW;
^
/home/jenkins/workspace/build-gcc-trunk/src/lto-plugin/lto-plugin.c: In
function 'claim_file_handler':
/home/jenkins/workspace/build-gcc-trunk/src/lto-plugin/lto-plugin.c:930:16:
warning: implicit declaration of function 'asprintf'
[-Wimplicit-function-declaration]
t = hi ? asprintf (&objname, "%s@0x%x%08x", file->name, lo, hi)
This change seems somewhat related:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=223589
--
Regards,
Mikhail Maltsev