[Bug c++/22238] Awful error messages with virtual functions
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 27 18:34:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22238
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmalcolm at gcc dot gnu.org
--- Comment #19 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
gcc trunk (r232888 fwiw) currently emits this for comment #0:
/tmp/test.cc: In member function ‘void A::bar()’:
/tmp/test.cc:4:23: error: could not convert ‘A::foo()’ from ‘void’ to ‘bool’
void bar() { if (foo()) ; }
~~~^~
and this for the dup reported in PR 50817:
/tmp/test2.cc: In function ‘void test(foo*)’:
/tmp/test2.cc:9:21: error: no match for ‘operator+’ (operand types are ‘int’
and ‘foo’)
return P->bar() + *P;
~~~~~~~~~^~~~
/tmp/test2.cc:9:24: error: return-statement with a value, in function returning
'void' [-fpermissive]
return P->bar() + *P;
^
Is it time to close this one out as fixed?
More information about the Gcc-bugs
mailing list