struct node { int*      operator int*(); };

gets you:

foo.cc:1: error: operator `int*' declared to return `int'

BTW, a better diagnostic would be something like:
error: operator `int*' should not declare a return type

-- 
           Summary: diagnostic shows wrong type
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to