public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11106] New: Error message gives partially mangled operator name
@ 2003-06-05 23:48 bangerth@dealii.org
  2003-06-05 23:52 ` [Bug c++/11106] " bangerth@dealii.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bangerth@dealii.org @ 2003-06-05 23:48 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Error message gives partially mangled operator name
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bangerth@dealii.org
                CC: gcc-bugs@gcc.gnu.org

The following code is clearly illegal (there really is no such member
that can be injected by the "using" declaration), but the code can be made
legal as in 11097. I make it illegal so that this bug can still be
triggered in case 11097 should already be fixed.

So, here's the code:
----------------------------
template <typename T> struct S {
    struct I {};
};

template <typename T> struct S2 : S<T> {
    using S<T>::operator typename S<T>::I*;
};

S<int>::I i = S2<int>();
----------------------------

The output we get from either 3.3 or mainline is:
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc: In instantiation of `S2<int>':
x.cc:9:   instantiated from here
x.cc:6: error: no members matching `using S<int>::operator PN1SIT_0__E1IE' in `
   struct S<int>'
x.cc:9: error: conversion from `S2<int>' to non-scalar type `S<int>::I'
   requested

Note that the name of the operator is only partially unmangled. This
is not very helpful. The problem already goes back to at least 2.95, so
no regression.

W.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-06-30 18:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-05 23:48 [Bug c++/11106] New: Error message gives partially mangled operator name bangerth@dealii.org
2003-06-05 23:52 ` [Bug c++/11106] " bangerth@dealii.org
2003-06-08 20:17 ` pinskia@physics.uc.edu
2003-06-15 14:37 ` giovannibajo@libero.it
2003-06-30 17:05 ` cvs-commit at gcc dot gnu dot org
2003-06-30 17:07 ` cvs-commit at gcc dot gnu dot org
2003-06-30 18:11 ` cvs-commit at gcc dot gnu dot org
2003-06-30 18:29 ` cvs-commit at gcc dot gnu dot org
2003-06-30 18:32 ` bangerth at dealii dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).