This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mainline bootstrap failure on alphaev67-dec-osf5.1

 > This time its alphaev67-dec-osf5.1 that's failing in stage 2
 > trying to compile java/jcf-io.c again with -Werror...
 > ../../gcc/gcc/java/jcf-io.c: In function `java_or_class_file':
 > ../../gcc/gcc/java/jcf-io.c:295: warning: passing arg 1 of `basename'
 > discards qualifiers from pointer target type
 > The line in question reads:
 >     const char *base = basename (entry->d_name)
 > where entry is a function argument declared as "const struct dirent
 > entry".  The problem here is that Tru64's headers define basename(3)
 > as "char * basename (char *)" rather than "const char * basename
 > (const char *)".
 > My question is whether it is appropriate to use libiberty's function
 > "lbasename" in this context, and always have known argument types.
 > If not, could someone explain the appropriate "configure" hackery to
 > determine the argument types on the current host.
 > Can anybody help, please?
 > Roger

Yes this is exactly why lbasename was introduced.  IMHO, with
appropriate testing this change is "obvious".


PS: there is also a basename call in fixinc/fixfixes.c.  The fixincl
directory doesn't use -Werror (yet) but might in the future if I can
work everything out.

Kaveh R. Ghazi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]