This is the mail archive of the gcc@gcc.gnu.org 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: Problems compiling KDE programs with GCC 3.3+


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:

> Andreas Jaeger <aj@suse.de> writes:
>
> | class QChar {
> | public:
> |     QChar( char c );
> |     QChar( unsigned char c );
> | };
> | 
> | class QString
> | {
> | public:
> |     QString( const char *str );                 // deep copy
> | 
> |     QString    &insert( unsigned int index, const QString & );
> |     QString    &insert( unsigned int index, QChar );
> |     QString    &prepend( const char* );
> | };
> | 
> | inline QString &QString::prepend( const char* s )
> | { return insert(0,s); }
>
> [...]
>
> | kde.cc: In member function `QString& QString::prepend(const char*)':
> | kde.cc:18: error: call of overloaded `insert(int, const char*&)' is ambiguous
> | kde.cc:12: error: candidates are: QString& QString::insert(unsigned int, const 
> |    QString&)
> | kde.cc:13: error:                 QString& QString::insert(unsigned int, QChar)
>
> This is clearly bogus:  There is no conversion sequence from 'const char*'
> to QChar.  Please fill that in GNATS database as a regression.

It looks like the regression [1] was introduced with this patch:
http://gcc.gnu.org/ml/gcc-patches/2002-12/msg00181.html

Jason, can you look into this, please?

Thanks,
Andreas

2002-12-03  Jason Merrill  <jason@redhat.com>

       * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
       an ambiguous conversion.



Andreas

Footnotes: 
[1]  I did a binary search with Janis' script (Thanks!) and this is
     the only C++ patch during those dates and it even looks like it
     applies ;-)

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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