public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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)'
@ 2015-05-27 23:58 danglin at gcc dot gnu.org
  2015-05-28  7:33 ` [Bug gcov-profile/66319] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-05-27 23:58 UTC (permalink / raw)
  To: gcc-bugs

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  <tsaunders@mozilla.com>

        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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-10-16  0:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 23:58 [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)' danglin at gcc dot gnu.org
2015-05-28  7:33 ` [Bug gcov-profile/66319] " rguenth at gcc dot gnu.org
2015-05-30 14:21 ` ebotcazou at gcc dot gnu.org
2015-06-02 13:28 ` [Bug bootstrap/66319] " jason at gcc dot gnu.org
2015-06-02 17:51 ` jason at gcc dot gnu.org
2015-06-04 17:43 ` jason at gcc dot gnu.org
2015-06-06 18:33 ` danglin at gcc dot gnu.org
2015-06-06 18:35 ` danglin at gcc dot gnu.org
2015-10-15 14:32 ` josephpattara at gmail dot com
2015-10-16  0:36 ` dave.anglin at bell dot net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).