Package: g++-3.0
Version: 3.0.2-10

This error is preventing ftpgrab from compiling on hppa. The test
cases below do not exhibit the same behavior on ia64.

fgfilegrab.cc:75: choosing `char FGString::operator[](unsigned int) const' over
   `operator[]'
fgfilegrab.cc:75:   because worst conversion for the former is better than
   worst conversion for the latter

I isolated the code in question into a test case, and found some
interesting results. When I stripped the FGString class down to
just one constructor and the operator[] method, I still saw the
error. When I stripped down the FGString header file to just
those two declarations, the code compiled.

I'm attaching a .tar.gz file with the code in question, along
with the .ii and .s files from the failed compile. Note that if
you replace "opov.h" with "simple.h", the code compiles.

Here is the command-line output with -v.

> g++ -v main.cc opov.o
Reading specs from /usr/lib/gcc-lib/hppa-linux/3.0.2/specs
Configured with: ../src/configure -v --enable-languages=c,c++,f77,proto,objc 
--prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared 
--with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls 
--without-included-gettext --disable-checking --enable-threads=posix 
--with-cpp-install-dir=bin hppa-linux
Thread model: posix
gcc version 3.0.2 20011014 (Debian prerelease)
 /usr/lib/gcc-lib/hppa-linux/3.0.2/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 
-D__GNUC_PATCHLEVEL__=2 -D__ELF__ -Dunix -D__hppa__ -Dlinux -D__ELF__ 
-D__unix__ -D__hppa__ -D__linux__ -D__unix -D__linux -Asystem=unix 
-Asystem=posix -Acpu=hppa -Amachine=hppa -Amachine=bigendian -D__NO_INLINE__ 
-D__STDC_HOSTED__=1 -D_GNU_SOURCE -D_PA_RISC1_1 main.cc -D__GNUG__=3 
-D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -mno-space-regs 
-quiet -dumpbase main.cc -version -o /tmp/ccvqDTGa.s
GNU CPP version 3.0.2 20011014 (Debian prerelease) (cpplib) (hppa)
GNU C++ version 3.0.2 20011014 (Debian prerelease) (hppa-linux)
        compiled by GNU C version 3.0.2 20011014 (Debian prerelease).
ignoring nonexistent directory "/usr/hppa-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++-v3
 /usr/include/g++-v3/hppa-linux
 /usr/include/g++-v3/backward
 /usr/local/include
 /usr/lib/gcc-lib/hppa-linux/3.0.2/include
 /usr/include
End of search list.
main.cc: In function `int main()':
main.cc:8: choosing `char FGString::operator[](unsigned int) const' over 
   `operator[]'
main.cc:8:   because worst conversion for the former is better than worst 
   conversion for the latter

Attachment: bug.tar.gz
Description: Files to demonstrate bug

Reply via email to