This is the mail archive of the gcc-bugs@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]

[Bug c++/13178] New: Bogus C++ error message referring to operator 1


Compiling this test case

template<typename t>
class C
{
  template<typename u> operator t() { return (u) this->i; }
  int i;
};
int fn (C<float> c) { return C<float>::operator float<int>(c); }

using the compiler in the build tree

gcc/xgcc -Bgcc/ -c ~/foo3.cc

yields this bogus error message:

/home/ian/foo3.cc: In function `int fn(C<float>)':
/home/ian/foo3.cc:7: error: no matching function for call to `C<float>::operator
1(C<float>&)'

There is obviously no ``operator 1''.  Admittedly this program is buggy, but the
error message should still be fixed.

-- 
           Summary: Bogus C++ error message referring to operator 1
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ian at airs dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13178


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