public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/39728] diagnostic for private operator= is voluminous and unhelpful
Date: Mon, 16 Apr 2012 11:11:00 -0000 [thread overview]
Message-ID: <bug-39728-4-Q7PaXC1HGz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-39728-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39728
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-16 11:10:07 UTC ---
Maybe the most widely used term is "compiler-generated" but I prefer implicity
defined.
(In reply to comment #2)
> * Do not show "In member function", it clutters the output and it is duplicated
> info because they are already mentioned in the note.
I'm not sure about this suggestion.
/home/redi/gcc/4.x/include/c++/4.8.0/bits/ios_base.h: In member function
'std::basic_ios<char>& std::basic_ios<char>::operator=(const
std::basic_ios<char>&)':
This is useful info, it tells me the (implicitly-defined) context in which the
private operator= was needed.
/home/redi/gcc/4.x/include/c++/4.8.0/bits/ios_base.h:791:5: error:
'std::ios_base& std::ios_base::operator=(const std::ios_base&)' is private
operator=(const ios_base&);
^
This is useful, it's the private operator= that was needed, but inaccessible.
In file included from /home/redi/gcc/4.x/include/c++/4.8.0/ios:45:0,
from /home/redi/gcc/4.x/include/c++/4.8.0/istream:40,
from /home/redi/gcc/4.x/include/c++/4.8.0/fstream:40,
from f.cc:1:
/home/redi/gcc/4.x/include/c++/4.8.0/bits/basic_ios.h:64:11: error: within this
context
class basic_ios : public ios_base
^
The caret diagnostic is useless here, because an implictly-defined function has
no location.
next prev parent reply other threads:[~2012-04-16 11:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-39728-4@http.gcc.gnu.org/bugzilla/>
2012-04-15 17:07 ` manu at gcc dot gnu.org
2012-04-16 10:45 ` redi at gcc dot gnu.org
2012-04-16 10:54 ` manu at gcc dot gnu.org
2012-04-16 11:11 ` redi at gcc dot gnu.org [this message]
2012-04-16 11:34 ` manu at gcc dot gnu.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=bug-39728-4-Q7PaXC1HGz@http.gcc.gnu.org/bugzilla/ \
--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: link
Be 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).