public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61089] Misleading error message regarding inability to convert pointers
[not found] <bug-61089-4@http.gcc.gnu.org/bugzilla/>
@ 2014-05-07 10:17 ` redi at gcc dot gnu.org
2014-05-07 16:24 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2014-05-07 10:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61089
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-05-07
Ever confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced to remove the Boost dependency:
class base; // {};
class derived; // : public base {};
void func(base* p);
derived* get();
int main()
{
func(get());
}
d.cc: In function 'int main()':
d.cc:11:13: error: cannot convert 'derived*' to 'base*' for argument '1' to
'void func(base*)'
func(get());
^
For comparison, clang outputs:
d.cc:11:3: error: no matching function for call to 'func'
func(get());
^~~~
d.cc:5:6: note: candidate function not viable: cannot convert argument of
incomplete type 'derived *' to 'base *'
void func(base* p);
^
1 error generated.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/61089] Misleading error message regarding inability to convert pointers
[not found] <bug-61089-4@http.gcc.gnu.org/bugzilla/>
2014-05-07 10:17 ` [Bug c++/61089] Misleading error message regarding inability to convert pointers redi at gcc dot gnu.org
@ 2014-05-07 16:24 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-05-07 16:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61089
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Same issue, right?
*** This bug has been marked as a duplicate of bug 13981 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-07 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-61089-4@http.gcc.gnu.org/bugzilla/>
2014-05-07 10:17 ` [Bug c++/61089] Misleading error message regarding inability to convert pointers redi at gcc dot gnu.org
2014-05-07 16:24 ` paolo.carlini at oracle dot com
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).