public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59295] New: useless warning: 'Bar' is already a friend of 'Foo' [enabled by default]
@ 2013-11-26  0:02 ppluzhnikov at google dot com
  2014-03-20 21:19 ` [Bug c++/59295] " ppluzhnikov at google dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ppluzhnikov at google dot com @ 2013-11-26  0:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59295
           Summary: useless warning: 'Bar' is already a friend of 'Foo'
                    [enabled by default]
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Google ref: b/11542609

Using trunk gcc:
g++ (GCC) 4.9.0 20131125 (experimental)

/// -- cut ---
class Foo {
 friend class Bar;
 friend class Bar;
};
/// -- cut ---


g++ -c t.cc
t.cc:3:15: warning: 'Bar' is already a friend of 'Foo' [enabled by default]
  friend class Bar;
               ^

This warning is purely stylistic -- no possible bug could happen when this
warning is disabled.

It is also not suppressable :-(

In actual code, both friend declarations come from macro expansion, and are
somewhat hard to get rid of.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-16 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-26  0:02 [Bug c++/59295] New: useless warning: 'Bar' is already a friend of 'Foo' [enabled by default] ppluzhnikov at google dot com
2014-03-20 21:19 ` [Bug c++/59295] " ppluzhnikov at google dot com
2014-03-21  1:18 ` ppluzhnikov at google dot com
2014-04-16 17:40 ` ppluzhnikov at gcc dot gnu.org
2014-04-16 17:41 ` ppluzhnikov at google 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).