From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15549 invoked by alias); 27 May 2015 23:58:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14926 invoked by uid 48); 27 May 2015 23:57:59 -0000 From: "danglin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/66319] New: [6 Regression] gcov-tool.c:84:65: error: invalid conversion from 'int (*)(const c har*, const stat*, int, FTW*)' to 'int (*)(const char*, const stat*, int, FTW)' Date: Wed, 27 May 2015 23:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: danglin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcchost cf_gcctarget cf_gccbuild Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg02289.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66319 Bug ID: 66319 Summary: [6 Regression] gcov-tool.c:84:65: error: invalid conversion from 'int (*)(const c har*, const stat*, int, FTW*)' to 'int (*)(const char*, const stat*, int, FTW)' Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: danglin at gcc dot gnu.org CC: tsaunders at mozilla dot com Target Milestone: --- Host: hppa2.0w-hp-hpux11.11 Target: hppa2.0w-hp-hpux11.11 Build: hppa2.0w-hp-hpux11.11 g++ -std=c++98 -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwi nd-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -Wno-error -DHAVE_CONFIG_H -I. -I. - I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../l ibcpp/include -I/opt/gnu/gcc/gmp/include -I../../gcc/gcc/../libdecnumber -I../. ./gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I/opt/gnu/gcc/gmp/include -I../../gcc/gcc/../libdecnu mber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../li bbacktrace -o libgcov-util.o ../../gcc/gcc/../libgcc/libgcov-util.c ../../gcc/gcc/gcov-tool.c: In function 'int unlink_profile_dir(const char*)': ../../gcc/gcc/gcov-tool.c:84:65: error: invalid conversion from 'int (*)(const c har*, const stat*, int, FTW*)' to 'int (*)(const char*, const stat*, int, FTW)' [-fpermissive] return nftw(path, unlink_gcda_file, 64, FTW_DEPTH | FTW_PHYS); ^ In file included from ../../gcc/gcc/gcov-tool.c:39:0: /usr/include/ftw.h:240:13: note: initializing argument 2 of 'int nftw(const ch ar*, int (*)(const char*, const stat*, int, FTW), int, int)' inline int nftw(const char *a,int (*b)(const char *, const struct ^ make[3]: *** [gcov-tool.o] Error 1 The problem is function declaration of unlink_gcda_file doesn't match declaration in In file included from ../../gcc/gcc/gcov-tool.c:39:0: /usr/include/ftw.h:240. Whether the fourth argument is "struct FTW *" or "struct FTW" depends on compilation defines: #ifdef _INCLUDE_XOPEN_SOURCE_EXTENDED /* * Do Mapping of nftw() */ #if (defined(_XPG4_EXTENDED) && !defined(_INCLUDE_HPUX_SOURCE)) || defined(_XOPE N_SOURCE_EXTENDED) inline int nftw(const char *a,int (*b)(const char *, const struct stat *, int, struct FTW *), int c, int d) {return __nftw64(a,b,c,d);} #else /* (defined(_XPG4_EXTENDED) && !defined(_INCLUDE_HPUX_SOURCE)) || defined( _XOPEN_SOURCE_EXTENDED) */ inline int nftw(const char *a,int (*b)(const char *, const struct stat *, int, struct FTW), int c, int d) {return __nftw64(a,b,c,d);} #endif /* (defined(_XPG4_EXTENDED) && !defined(_INCLUDE_HPUX_SOURCE)) || defined (_XOPEN_SOURCE_EXTENDED) */ #endif /* _INCLUDE_XOPEN_SOURCE_EXTENDED */ Sadly, unlink_gcda_file doesn't use this argument. Probably introduced by 2015-02-09 Trevor Saunders PR gcov-profile/61889 * config.in: regenerate. * configure.in: Likewise. * configure.ac: Check for ftw.h. * gcov-tool.c: Check for ftw.h before using nftw. and my switch to building with gcc-5. There were numerous successful builds after the above change was applied.