This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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 gdb/22608] New: operator<< completion clips to operator<


https://sourceware.org/bugzilla/show_bug.cgi?id=22608

            Bug ID: 22608
           Summary: operator<< completion clips to operator<
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: keiths at redhat dot com
  Target Milestone: ---

Source:

$ cat >oplt.cc << EOF
template<class C> class Empty
{
};

template <typename T>
bool operator< (T &lhs, T &rhs)
{
  return false;
}

template <typename T>
int operator<< (T &obj, T &val)
{
  return 0;
}

int
main ()
{
  Empty<int> ei;
  bool b = ei < ei;
  int i = ei << ei;
  return 0;
}
EOF
$ g++ -g oplt.cc -o oplt
$ gdb -q oplt
Reading symbols from /home/keiths/tmp/oplt...done.
(gdb) complete break operator<
break operator< <Empty<int> >(Empty<int>&, Empty<int>&)
break operator<< <Empty<int> >(Empty<int>&, Empty<int>&)
/* correct */
(gdb) complete break operator<<
break operator< <Empty<int> >(Empty<int>&, Empty<int>&)
break operator<< <Empty<int> >(Empty<int>&, Empty<int>&)
/* /not/ correct */
(gdb) break operator<<[TAB]
break operator< <Empty<int> >(Empty<int>&, Empty<int>&)
break operator<< <Empty<int> >(Empty<int>&, Empty<int>&)
(gdb) break operator<  /* notice the output clipped the last `<' */

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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