From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25711 invoked by alias); 16 Apr 2012 11:11:06 -0000 Received: (qmail 25697 invoked by uid 22791); 16 Apr 2012 11:11:05 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Apr 2012 11:10:50 +0000 From: "redi at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg01276.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39728 --- Comment #5 from Jonathan Wakely 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& std::basic_ios::operator=(const std::basic_ios&)': 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.