public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/44122] Confusing error: cannot convert 'T*' to 'T*' Date: Sat, 15 May 2010 00:47:00 -0000 [thread overview] Message-ID: <20100515004728.1268.qmail@sourceware.org> (raw) In-Reply-To: <bug-44122-17355@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from redi at gcc dot gnu dot org 2010-05-15 00:47 ------- (In reply to comment #1) > Have you tried with Clang? > > I think Clang prints typedefs using 'aka', which is not very clear. > > error: incompatible type assigning 'vector<Real>', expected 'std::string' (aka > 'class std::basic_string<char>') > > I would suggest: > > t.cc:8: error: cannot convert 'bar::Py_ssize_t*' ('int*') to 'Py_ssize_t*' > ('long*') for 1st argument to 'int foo(Py_ssize_t*)' 1) bar:: looks like valid C++ syntax but it is not a valid nested-name-specifier, so it should be something that is not valid C++ syntax, such as {bar}::Py_ssize_t 2) Although the quotes _should_ make it clear, I think that could get confusing when the type involves parentheses, e.g. cannot convert 'my_fun_type' ('int* (Foo::*)(char*)') to 'int* const (Foo::*)(char*)' How about adding "typedef for" in there? e.g. cannot convert 'bar::Py_ssize_t*' (typedef for 'int*') > Do we have typedef unwrapping? We used to only have unwrapped typedefs, so hopefully we can still get it when wanted! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44122
next prev parent reply other threads:[~2010-05-15 0:47 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-05-13 18:53 [Bug c++/44122] New: Confusing error: cannot convert 'T* to T* ppluzhnikov at google dot com 2010-05-15 0:16 ` [Bug c++/44122] Confusing error: cannot convert 'T*' to 'T*' manu at gcc dot gnu dot org 2010-05-15 0:47 ` redi at gcc dot gnu dot org [this message] 2010-05-15 0:55 ` manu at gcc dot gnu dot org 2010-05-15 0:59 ` ppluzhnikov at google dot com 2010-07-24 21:17 ` [Bug c++/44122] Confusing error: cannot convert 'T*' to 'T*' (when T are different scopes) pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100515004728.1268.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).