public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vova7890 at mail dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58263] [feature request] friend class $UndefinedClass
Date: Wed, 28 Aug 2013 18:01:00 -0000	[thread overview]
Message-ID: <bug-58263-4-gfU8CKopcn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58263-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58263

--- Comment #5 from vova7890 <vova7890 at mail dot ru> ---
(In reply to Jonathan Wakely from comment #3)
> But that will warn about valid code, where you didn't spell the name wrong.

Yes, but it can be not in one file, as in example. If it in one file, and
friend class is below the main class, can avoid warning by this:

class MyClass2;

class MyClass1
{
   friend class MyClass2; // trivial stupid human issue with MyClas2 ->
MyClass2
private:
   void help();
};

class MyClass2
{
public:
   void need(MyClass1 *cl) {
      cl->help();   // error: is private!!
   }
};

Also, maybe can use it on paranoid level warnings, for example.


  parent reply	other threads:[~2013-08-28 18:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28 14:45 [Bug c++/58263] New: " vova7890 at mail dot ru
2013-08-28 14:51 ` [Bug c++/58263] " redi at gcc dot gnu.org
2013-08-28 16:32 ` vova7890 at mail dot ru
2013-08-28 17:29 ` redi at gcc dot gnu.org
2013-08-28 17:42 ` pinskia at gcc dot gnu.org
2013-08-28 18:01 ` vova7890 at mail dot ru [this message]
2013-08-28 18:15 ` vova7890 at mail dot ru

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-58263-4-gfU8CKopcn@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).