Mainline bootstrap failure on alphaev67-dec-osf5.1

Roger Sayle roger@www.eyesopen.com
Wed Feb 5 07:15:00 GMT 2003


My apologies in advance to Kaveh Ghazi and Dave Anglin.
I'm just trying to get GCC bootstrapping again on my local
platforms, and not trying to apportion blame in any way.

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.


Sorry once again for any inconvenience.  I'm actually a fan of
"-Werror" as it obviates the task of scanning make output to
see if I've accidentally introduced a warning.

Can anybody help, please?

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833



More information about the Gcc-patches mailing list